<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="cache-control" content="max-age=86400"/>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GBDK 2020 Docs: gbdk-lib/include/nes/nes.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GBDK 2020 Docs
   &#160;<span id="projectnumber">4.4.0</span>
   </div>
   <div id="projectbrief">API Documentation for GBDK 2020</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('nes_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">nes.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;types.h&gt;</code><br />
<code>#include &lt;<a class="el" href="stdint_8h_source.html">stdint.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="version_8h_source.html">gbdk/version.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="nes_2hardware_8h_source.html">nes/hardware.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="rgb__to__nes__macro_8h_source.html">nes/rgb_to_nes_macro.h</a>&gt;</code><br />
</div>
<p><a href="nes_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjoypads__t.html">joypads_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a418f95f7c7744aa18840d4101388916a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a418f95f7c7744aa18840d4101388916a">NINTENDO_NES</a></td></tr>
<tr class="separator:a418f95f7c7744aa18840d4101388916a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e73068b3ffdb8436eaa3362f104ba74"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a1e73068b3ffdb8436eaa3362f104ba74">SYSTEM_BITS_NTSC</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="separator:a1e73068b3ffdb8436eaa3362f104ba74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a599f3df346be94f25498749e2442bde8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a599f3df346be94f25498749e2442bde8">SYSTEM_BITS_PAL</a>&#160;&#160;&#160;0x40</td></tr>
<tr class="separator:a599f3df346be94f25498749e2442bde8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa370f208d677a232346ddf00a8ef7243"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aa370f208d677a232346ddf00a8ef7243">SYSTEM_BITS_DENDY</a>&#160;&#160;&#160;0x80</td></tr>
<tr class="separator:aa370f208d677a232346ddf00a8ef7243"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99bca2df4c6fde16a659797b4e584036"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a99bca2df4c6fde16a659797b4e584036">SYSTEM_60HZ</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="separator:a99bca2df4c6fde16a659797b4e584036"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6329c19927cf02579e2503e40c0bbde"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad6329c19927cf02579e2503e40c0bbde">SYSTEM_50HZ</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:ad6329c19927cf02579e2503e40c0bbde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae85f322d3e5c6f1f1ebc934ae22f51ea"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae85f322d3e5c6f1f1ebc934ae22f51ea">TIMER_VBLANK_PARITY_MODE_SYSTEM_60HZ</a>&#160;&#160;&#160;0x78</td></tr>
<tr class="separator:ae85f322d3e5c6f1f1ebc934ae22f51ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a99bab8bac700048df9d8797bed56ce"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a9a99bab8bac700048df9d8797bed56ce">TIMER_VBLANK_PARITY_MODE_SYSTEM_50HZ</a>&#160;&#160;&#160;0x5D</td></tr>
<tr class="separator:a9a99bab8bac700048df9d8797bed56ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a118ad3ee36468a3fa616977a64864e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(r,  g,  <a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;<a class="el" href="rgb__to__nes__macro_8h.html#aa83d79eaa6230c94a1326b9f88d6b0ad">RGB_TO_NES</a>(((r) | ((g) &lt;&lt; 2) | ((<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &lt;&lt; 4)))</td></tr>
<tr class="separator:a4a118ad3ee36468a3fa616977a64864e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d2ed0f10b2b74123a544327bbfd7564"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8</a>(r,  g,  <a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;<a class="el" href="rgb__to__nes__macro_8h.html#aa83d79eaa6230c94a1326b9f88d6b0ad">RGB_TO_NES</a>((((r) &gt;&gt; 6) | (((g) &gt;&gt; 6) &lt;&lt; 2) | (((<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 6) &lt;&lt; 4)))</td></tr>
<tr class="separator:a7d2ed0f10b2b74123a544327bbfd7564"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5a6e450fcf10402278fe585a421dbbd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab5a6e450fcf10402278fe585a421dbbd">RGBHTML</a>(RGB24bit)&#160;&#160;&#160;<a class="el" href="rgb__to__nes__macro_8h.html#aa83d79eaa6230c94a1326b9f88d6b0ad">RGB_TO_NES</a>((((RGB24bit) &gt;&gt; 22) | ((((RGB24bit) &amp; 0xFFFF) &gt;&gt; 14) &lt;&lt; 2) | ((((RGB24bit) &amp; 0xFF) &gt;&gt; 6) &lt;&lt; 4)))</td></tr>
<tr class="separator:ab5a6e450fcf10402278fe585a421dbbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa039288455af8a3812a35aa1e7b903e4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aa039288455af8a3812a35aa1e7b903e4">RGB_RED</a>&#160;&#160;&#160;0x16</td></tr>
<tr class="separator:aa039288455af8a3812a35aa1e7b903e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae29b6947ac7dca7db513e59f1cfcbf51"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae29b6947ac7dca7db513e59f1cfcbf51">RGB_DARKRED</a>&#160;&#160;&#160;0x06</td></tr>
<tr class="separator:ae29b6947ac7dca7db513e59f1cfcbf51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6c97468034c02fe204fd37036d9be15"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab6c97468034c02fe204fd37036d9be15">RGB_GREEN</a>&#160;&#160;&#160;0x2A</td></tr>
<tr class="separator:ab6c97468034c02fe204fd37036d9be15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ee7a5d8fd635e9132a2820a60f9789d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a1ee7a5d8fd635e9132a2820a60f9789d">RGB_DARKGREEN</a>&#160;&#160;&#160;0x1A</td></tr>
<tr class="separator:a1ee7a5d8fd635e9132a2820a60f9789d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0eff802f1ca228046476209dc01c76ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a0eff802f1ca228046476209dc01c76ad">RGB_BLUE</a>&#160;&#160;&#160;0x12</td></tr>
<tr class="separator:a0eff802f1ca228046476209dc01c76ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad44385fc245bbabf6da787dcc8930385"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad44385fc245bbabf6da787dcc8930385">RGB_DARKBLUE</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="separator:ad44385fc245bbabf6da787dcc8930385"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad74a18fca945f257dc9d1b99f9edbd40"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad74a18fca945f257dc9d1b99f9edbd40">RGB_YELLOW</a>&#160;&#160;&#160;0x28</td></tr>
<tr class="separator:ad74a18fca945f257dc9d1b99f9edbd40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2727da9f8c0b09a67375575a00186e2a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a2727da9f8c0b09a67375575a00186e2a">RGB_DARKYELLOW</a>&#160;&#160;&#160;0x18</td></tr>
<tr class="separator:a2727da9f8c0b09a67375575a00186e2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ce30ac984869b55594447722b9d0579"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a2ce30ac984869b55594447722b9d0579">RGB_CYAN</a>&#160;&#160;&#160;0x2C</td></tr>
<tr class="separator:a2ce30ac984869b55594447722b9d0579"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4fe0c6cfa46b0c4804425f23bb48f4c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae4fe0c6cfa46b0c4804425f23bb48f4c">RGB_AQUA</a>&#160;&#160;&#160;0x1C</td></tr>
<tr class="separator:ae4fe0c6cfa46b0c4804425f23bb48f4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59fb596d3d65cfc4d3cb7e5044b8b10a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a59fb596d3d65cfc4d3cb7e5044b8b10a">RGB_PINK</a>&#160;&#160;&#160;0x24</td></tr>
<tr class="separator:a59fb596d3d65cfc4d3cb7e5044b8b10a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d5a5f880df6bd4b64e6546839d41101"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a9d5a5f880df6bd4b64e6546839d41101">RGB_PURPLE</a>&#160;&#160;&#160;0x14</td></tr>
<tr class="separator:a9d5a5f880df6bd4b64e6546839d41101"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae168f0f9864d4ed4be7807b9783f17f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae168f0f9864d4ed4be7807b9783f17f1">RGB_BLACK</a>&#160;&#160;&#160;0x0F</td></tr>
<tr class="separator:ae168f0f9864d4ed4be7807b9783f17f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29b47e2361025eabcdc3bcbff2308044"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a29b47e2361025eabcdc3bcbff2308044">RGB_DARKGRAY</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="separator:a29b47e2361025eabcdc3bcbff2308044"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80efbf7b13421922fb174f3e6a3e235c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a80efbf7b13421922fb174f3e6a3e235c">RGB_LIGHTGRAY</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:a80efbf7b13421922fb174f3e6a3e235c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1771f95d9887118764bd8a074e537e1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ac1771f95d9887118764bd8a074e537e1">RGB_WHITE</a>&#160;&#160;&#160;0x30</td></tr>
<tr class="separator:ac1771f95d9887118764bd8a074e537e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05ca817ab32f6da612c3ae26db5abf02"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a05ca817ab32f6da612c3ae26db5abf02">J_UP</a>&#160;&#160;&#160;0x08U</td></tr>
<tr class="separator:a05ca817ab32f6da612c3ae26db5abf02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae032c5c544196e37ec0432f6cfad7904"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae032c5c544196e37ec0432f6cfad7904">J_DOWN</a>&#160;&#160;&#160;0x04U</td></tr>
<tr class="separator:ae032c5c544196e37ec0432f6cfad7904"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac70894fecac30c1ca9917f07373cf81c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ac70894fecac30c1ca9917f07373cf81c">J_LEFT</a>&#160;&#160;&#160;0x02U</td></tr>
<tr class="separator:ac70894fecac30c1ca9917f07373cf81c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bad91d11ae09ffcbb3cb0a81873d325"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325">J_RIGHT</a>&#160;&#160;&#160;0x01U</td></tr>
<tr class="separator:a3bad91d11ae09ffcbb3cb0a81873d325"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31af766e3b598eb7a6b63f55a4988e7a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a31af766e3b598eb7a6b63f55a4988e7a">J_A</a>&#160;&#160;&#160;0x80U</td></tr>
<tr class="separator:a31af766e3b598eb7a6b63f55a4988e7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae47e59a309120f9420993f26816b5e6d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae47e59a309120f9420993f26816b5e6d">J_B</a>&#160;&#160;&#160;0x40U</td></tr>
<tr class="separator:ae47e59a309120f9420993f26816b5e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab416a9d96d1582490828f4bac78a8b5b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab416a9d96d1582490828f4bac78a8b5b">J_SELECT</a>&#160;&#160;&#160;0x20U</td></tr>
<tr class="separator:ab416a9d96d1582490828f4bac78a8b5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab769c6e20778298be8bc3321476ceb53"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab769c6e20778298be8bc3321476ceb53">J_START</a>&#160;&#160;&#160;0x10U</td></tr>
<tr class="separator:ab769c6e20778298be8bc3321476ceb53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc9798fc62b5d626c91c8b0f20b522ff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#acc9798fc62b5d626c91c8b0f20b522ff">M_DRAWING</a>&#160;&#160;&#160;0x01U</td></tr>
<tr class="separator:acc9798fc62b5d626c91c8b0f20b522ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0e30d6af308ffe5a025fbe85da40f6f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#af0e30d6af308ffe5a025fbe85da40f6f">M_TEXT_OUT</a>&#160;&#160;&#160;0x02U</td></tr>
<tr class="separator:af0e30d6af308ffe5a025fbe85da40f6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a908826e7180f94a5988ceb8633313a2e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a908826e7180f94a5988ceb8633313a2e">M_TEXT_INOUT</a>&#160;&#160;&#160;0x03U</td></tr>
<tr class="separator:a908826e7180f94a5988ceb8633313a2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04382de20738146fe873ddfb0585052b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a04382de20738146fe873ddfb0585052b">M_NO_SCROLL</a>&#160;&#160;&#160;0x04U</td></tr>
<tr class="separator:a04382de20738146fe873ddfb0585052b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca2855edd2d28f66be551a0f7ec23f07"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aca2855edd2d28f66be551a0f7ec23f07">M_NO_INTERP</a>&#160;&#160;&#160;0x08U</td></tr>
<tr class="separator:aca2855edd2d28f66be551a0f7ec23f07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54572cf6791463b6d60623837e0bb5a6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a54572cf6791463b6d60623837e0bb5a6">S_PALETTE</a>&#160;&#160;&#160;0x10U</td></tr>
<tr class="separator:a54572cf6791463b6d60623837e0bb5a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae97793b4039609f93b0f7f8bddb18011"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a>&#160;&#160;&#160;0x40U</td></tr>
<tr class="separator:ae97793b4039609f93b0f7f8bddb18011"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bbb9cd6c38b2317de5256d1d889c63b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a>&#160;&#160;&#160;0x80U</td></tr>
<tr class="separator:a4bbb9cd6c38b2317de5256d1d889c63b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9506d04c2ec7d2442a52054f67d2b32f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a9506d04c2ec7d2442a52054f67d2b32f">S_PRIORITY</a>&#160;&#160;&#160;0x20U</td></tr>
<tr class="separator:a9506d04c2ec7d2442a52054f67d2b32f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a826169925ff12d52f0a0d51f14d2936b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a826169925ff12d52f0a0d51f14d2936b">S_PAL</a>(n)&#160;&#160;&#160;n</td></tr>
<tr class="separator:a826169925ff12d52f0a0d51f14d2936b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa027abe630d44039f238034bcb2d2f36"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aa027abe630d44039f238034bcb2d2f36">EMPTY_IFLAG</a>&#160;&#160;&#160;0x00U</td></tr>
<tr class="separator:aa027abe630d44039f238034bcb2d2f36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ca7720b9a5da9b2173e1f74dba85541"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a2ca7720b9a5da9b2173e1f74dba85541">VBL_IFLAG</a>&#160;&#160;&#160;0x01U</td></tr>
<tr class="separator:a2ca7720b9a5da9b2173e1f74dba85541"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61a9e2910380de6abb34df14ef634eb4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a61a9e2910380de6abb34df14ef634eb4">LCD_IFLAG</a>&#160;&#160;&#160;0x02U</td></tr>
<tr class="separator:a61a9e2910380de6abb34df14ef634eb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a604256210ec5b90b68185e1a18efab49"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a604256210ec5b90b68185e1a18efab49">TIM_IFLAG</a>&#160;&#160;&#160;0x04U</td></tr>
<tr class="separator:a604256210ec5b90b68185e1a18efab49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab311e53739c992294ae07ca506a924ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a>&#160;&#160;&#160;0x03</td></tr>
<tr class="separator:ab311e53739c992294ae07ca506a924ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45d13a674e169dd83df7e1f46513ccba"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="separator:a45d13a674e169dd83df7e1f46513ccba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ccd6732d3bdf390cc0943e8567341f3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:a8ccd6732d3bdf390cc0943e8567341f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11cedc2ee58acfbbfc48dfb2b9a551b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="separator:a11cedc2ee58acfbbfc48dfb2b9a551b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9727caafc483ba6ec65e9344b033d684"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a9727caafc483ba6ec65e9344b033d684">DMG_PALETTE</a>(C0,  C1,  C2,  C3)&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((((C3) &amp; 0x03) &lt;&lt; 6) | (((C2) &amp; 0x03) &lt;&lt; 4) | (((C1) &amp; 0x03) &lt;&lt; 2) | ((C0) &amp; 0x03)))</td></tr>
<tr class="separator:a9727caafc483ba6ec65e9344b033d684"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada0cc738d27aad251151e69cb8d250e1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ada0cc738d27aad251151e69cb8d250e1">SCREENWIDTH</a>&#160;&#160;&#160;<a class="el" href="sms_2hardware_8h.html#ad14c51cdfb347c34c364f54e67dc978d">DEVICE_SCREEN_PX_WIDTH</a></td></tr>
<tr class="separator:ada0cc738d27aad251151e69cb8d250e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae189e98d0ef9263c37869ce1ff3710a5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae189e98d0ef9263c37869ce1ff3710a5">SCREENHEIGHT</a>&#160;&#160;&#160;<a class="el" href="sms_2hardware_8h.html#a7bd450aa268b881257089cf8cd6697ec">DEVICE_SCREEN_PX_HEIGHT</a></td></tr>
<tr class="separator:ae189e98d0ef9263c37869ce1ff3710a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00573fe55b0f1e2dd03b9647dfe15636"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a00573fe55b0f1e2dd03b9647dfe15636">MAX_LCD_ISR_CALLS</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:a00573fe55b0f1e2dd03b9647dfe15636"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae042588f20bf5a2349c8ad8716245233"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae042588f20bf5a2349c8ad8716245233">CURRENT_BANK</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a></td></tr>
<tr class="separator:ae042588f20bf5a2349c8ad8716245233"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42705001e2b9897f5167b67fb36c69dd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a42705001e2b9897f5167b67fb36c69dd">BANK</a>(VARNAME)&#160;&#160;&#160;( (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>) &amp; __bank_ ## VARNAME )</td></tr>
<tr class="separator:a42705001e2b9897f5167b67fb36c69dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a086293f2afb4c7945460a4496b20aea3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF</a>(VARNAME)</td></tr>
<tr class="separator:a086293f2afb4c7945460a4496b20aea3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a261bba55a07b802baf99346feadd9852"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a261bba55a07b802baf99346feadd9852">BANKREF_EXTERN</a>(VARNAME)&#160;&#160;&#160;extern const void __bank_ ## VARNAME;</td></tr>
<tr class="separator:a261bba55a07b802baf99346feadd9852"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a412db28bcf6bda7f235d7c5d3c9d52c0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a412db28bcf6bda7f235d7c5d3c9d52c0">SWITCH_ROM_DUMMY</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td></tr>
<tr class="separator:a412db28bcf6bda7f235d7c5d3c9d52c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d29df5dc3791dbf77488b3322b71d6c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a2d29df5dc3791dbf77488b3322b71d6c">SWITCH_ROM_UNROM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;<a class="el" href="nes_8h.html#a7d6c7ed0155e52b62936a04f6d98715d">_switch_prg0</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td></tr>
<tr class="separator:a2d29df5dc3791dbf77488b3322b71d6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e22a3b60368bb5f3705d625ac2d09cc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a1e22a3b60368bb5f3705d625ac2d09cc">SWITCH_ROM</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a2d29df5dc3791dbf77488b3322b71d6c">SWITCH_ROM_UNROM</a></td></tr>
<tr class="separator:a1e22a3b60368bb5f3705d625ac2d09cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a121feb0c32d124562f52398aa9656e7b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a121feb0c32d124562f52398aa9656e7b">SWITCH_RAM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;0</td></tr>
<tr class="separator:a121feb0c32d124562f52398aa9656e7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e9c88657beaac946231a4801481b97f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a></td></tr>
<tr class="separator:a0e9c88657beaac946231a4801481b97f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a649d27b5587de16a66176e03a1b8ebd5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a649d27b5587de16a66176e03a1b8ebd5">DISABLE_RAM</a></td></tr>
<tr class="separator:a649d27b5587de16a66176e03a1b8ebd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ae6b05b3e1559c97f0d1b2daaaa0ee4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a>&#160;&#160;&#160;  <a class="el" href="nes_8h.html#a42756a31babdcb4b7e692960a069b13b">display_on</a>();</td></tr>
<tr class="separator:a5ae6b05b3e1559c97f0d1b2daaaa0ee4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2ec9831813c5e7069917aa4455af682"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad2ec9831813c5e7069917aa4455af682">DISPLAY_OFF</a>&#160;&#160;&#160;  <a class="el" href="sms_8h.html#afe5714734a8fea7b1617ba377b3c0a06">display_off</a>();</td></tr>
<tr class="separator:ad2ec9831813c5e7069917aa4455af682"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0659212acd317ccdebc0ecf435df330f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a0659212acd317ccdebc0ecf435df330f">HIDE_LEFT_COLUMN</a>&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> &amp;= ~(<a class="el" href="nes_2hardware_8h.html#a0921fb5a3bfa138b479df91189d51f1c">PPUMASK_SHOW_BG_LC</a> | <a class="el" href="nes_2hardware_8h.html#add0805a7bbaa88cf568f7a8fa7eb252c">PPUMASK_SHOW_SPR_LC</a>); \</td></tr>
<tr class="separator:a0659212acd317ccdebc0ecf435df330f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5497c2255a9474d397446710189eacbe"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a5497c2255a9474d397446710189eacbe">SHOW_LEFT_COLUMN</a>&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> |= (<a class="el" href="nes_2hardware_8h.html#a0921fb5a3bfa138b479df91189d51f1c">PPUMASK_SHOW_BG_LC</a> | <a class="el" href="nes_2hardware_8h.html#add0805a7bbaa88cf568f7a8fa7eb252c">PPUMASK_SHOW_SPR_LC</a>);</td></tr>
<tr class="separator:a5497c2255a9474d397446710189eacbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f3f7bd5879b807acbb203ce2aaa1e5d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a3f3f7bd5879b807acbb203ce2aaa1e5d">SET_BORDER_COLOR</a>(C)</td></tr>
<tr class="separator:a3f3f7bd5879b807acbb203ce2aaa1e5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e3f36aa68ac036695816757f2a1322c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a>&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> |= <a class="el" href="nes_2hardware_8h.html#aaf30bd58f6f863e21f605957d547bdd7">PPUMASK_SHOW_BG</a>;</td></tr>
<tr class="separator:a8e3f36aa68ac036695816757f2a1322c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d25f7c43b1cbbb48b95cda7ab2c3141"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a6d25f7c43b1cbbb48b95cda7ab2c3141">HIDE_BKG</a>&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> &amp;= ~<a class="el" href="nes_2hardware_8h.html#aaf30bd58f6f863e21f605957d547bdd7">PPUMASK_SHOW_BG</a>;</td></tr>
<tr class="separator:a6d25f7c43b1cbbb48b95cda7ab2c3141"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a495bc9f405f916f02ad5d97e6e730134"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a495bc9f405f916f02ad5d97e6e730134">SHOW_SPRITES</a>&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> |= <a class="el" href="nes_2hardware_8h.html#a73dfa1e321b7b5a3835450c0382f7779">PPUMASK_SHOW_SPR</a>;</td></tr>
<tr class="separator:a495bc9f405f916f02ad5d97e6e730134"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69ef98aee664b8abd8d1a3d45f016dda"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a69ef98aee664b8abd8d1a3d45f016dda">HIDE_SPRITES</a>&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> &amp;= ~<a class="el" href="nes_2hardware_8h.html#a73dfa1e321b7b5a3835450c0382f7779">PPUMASK_SHOW_SPR</a>;</td></tr>
<tr class="separator:a69ef98aee664b8abd8d1a3d45f016dda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af91d252f07f4764996154820f970c101"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#af91d252f07f4764996154820f970c101">SPRITES_8x16</a>&#160;&#160;&#160;  <a class="el" href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a> |= <a class="el" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a>;</td></tr>
<tr class="separator:af91d252f07f4764996154820f970c101"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa87bec0d134136fdb727f52cb773b792"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aa87bec0d134136fdb727f52cb773b792">SPRITES_8x8</a>&#160;&#160;&#160;  <a class="el" href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a> &amp;= ~<a class="el" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a>;</td></tr>
<tr class="separator:aa87bec0d134136fdb727f52cb773b792"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67f80e65620470b55a4950e2966eb868"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a67f80e65620470b55a4950e2966eb868">COMPAT_PALETTE</a>(C0,  C1,  C2,  C3)&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)(((C3) &lt;&lt; 6) | ((C2) &lt;&lt; 4) | ((C1) &lt;&lt; 2) | (C0)))</td></tr>
<tr class="separator:a67f80e65620470b55a4950e2966eb868"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab94bfec130df50d9cb808142f94603a5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab94bfec130df50d9cb808142f94603a5">set_bkg_2bpp_data</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a8130306da1177f4fef89e699f8e2add4">set_bkg_data</a></td></tr>
<tr class="separator:ab94bfec130df50d9cb808142f94603a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55f82ff980398dd97036fd936ebd727e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a55f82ff980398dd97036fd936ebd727e">set_tile_map</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a></td></tr>
<tr class="separator:a55f82ff980398dd97036fd936ebd727e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb5d0970167b81401113812773c90838"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#adb5d0970167b81401113812773c90838">set_tile_submap</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a0cfd261bc7a94b1f6093f423bad30298">set_bkg_submap</a></td></tr>
<tr class="separator:adb5d0970167b81401113812773c90838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b235c526c517fb02d20cdea780ee2c5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a3b235c526c517fb02d20cdea780ee2c5">set_tile_xy</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a31655c4b138654e803e295bd4413759c">set_bkg_tile_xy</a></td></tr>
<tr class="separator:a3b235c526c517fb02d20cdea780ee2c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7a73323735000cf26196e073cbbdcbf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad7a73323735000cf26196e073cbbdcbf">set_attribute_xy</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a7cd23c81062d37753a4429b794907524">set_bkg_attribute_xy</a></td></tr>
<tr class="separator:ad7a73323735000cf26196e073cbbdcbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43b4f0ba65856deef626c0d9e7e41ed4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a43b4f0ba65856deef626c0d9e7e41ed4">set_sprite_2bpp_data</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a216a3e3d320ee4d8cf4845600487ae39">set_sprite_data</a></td></tr>
<tr class="separator:a43b4f0ba65856deef626c0d9e7e41ed4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47607089a434dcda7a8583cfca03b604"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a47607089a434dcda7a8583cfca03b604">DISABLE_OAM_DMA</a>&#160;&#160;&#160;    <a class="el" href="sms_8h.html#a5435fd985412934e96a490e103c6bc49">_shadow_OAM_base</a> = 0</td></tr>
<tr class="separator:a47607089a434dcda7a8583cfca03b604"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfd70bf31185a4900680977c9fb5a5ec"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#abfd70bf31185a4900680977c9fb5a5ec">DISABLE_VBL_TRANSFER</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a47607089a434dcda7a8583cfca03b604">DISABLE_OAM_DMA</a></td></tr>
<tr class="separator:abfd70bf31185a4900680977c9fb5a5ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20895d53fe9caacb08ce8b071d57ce53"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a20895d53fe9caacb08ce8b071d57ce53">ENABLE_OAM_DMA</a>&#160;&#160;&#160;    <a class="el" href="sms_8h.html#a5435fd985412934e96a490e103c6bc49">_shadow_OAM_base</a> = (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)&amp;<a class="el" href="sms_8h.html#af02f9e73bd894cc25e03aedb0a10a91d">shadow_OAM</a> &gt;&gt; 8)</td></tr>
<tr class="separator:a20895d53fe9caacb08ce8b071d57ce53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77d516c9d3f86f100eddea5e0d133a76"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a77d516c9d3f86f100eddea5e0d133a76">ENABLE_VBL_TRANSFER</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a20895d53fe9caacb08ce8b071d57ce53">ENABLE_OAM_DMA</a></td></tr>
<tr class="separator:a77d516c9d3f86f100eddea5e0d133a76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b77608c87a9aef65a03531482b2163b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a8b77608c87a9aef65a03531482b2163b">MAX_HARDWARE_SPRITES</a>&#160;&#160;&#160;64</td></tr>
<tr class="separator:a8b77608c87a9aef65a03531482b2163b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc296eacbda6a42f2a71aacab376ceb7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#afc296eacbda6a42f2a71aacab376ceb7">HARDWARE_SPRITE_CAN_FLIP_X</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:afc296eacbda6a42f2a71aacab376ceb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9119d69d971f6bee9e55d0df8f0ac983"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a9119d69d971f6bee9e55d0df8f0ac983">HARDWARE_SPRITE_CAN_FLIP_Y</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a9119d69d971f6bee9e55d0df8f0ac983"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47865835d7d007d71b4bc8ae5cefb73a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a47865835d7d007d71b4bc8ae5cefb73a">fill_rect</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a6879d813b6105ff8d9b36ec55c26a36e">fill_bkg_rect</a></td></tr>
<tr class="separator:a47865835d7d007d71b4bc8ae5cefb73a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:aa1843c9b694489b612595631315c1c21"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aa1843c9b694489b612595631315c1c21">palette_color_t</a></td></tr>
<tr class="separator:aa1843c9b694489b612595631315c1c21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9508f919d9482d1d51534ccac212454d"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>) (void) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td></tr>
<tr class="separator:a9508f919d9482d1d51534ccac212454d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e5ea12b86bdfc812448c2f5c4336c03"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a8e5ea12b86bdfc812448c2f5c4336c03">OAM_item_t</a></td></tr>
<tr class="separator:a8e5ea12b86bdfc812448c2f5c4336c03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab38fda7bad70c80c390aa7017c48b405"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab38fda7bad70c80c390aa7017c48b405">set_bkg_palette</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_palette, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_palettes, const <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *rgb_data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ab38fda7bad70c80c390aa7017c48b405"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c75cb6992e73971f24cee46aa31184b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a7c75cb6992e73971f24cee46aa31184b">set_sprite_palette</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_palette, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_palettes, const <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *rgb_data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a7c75cb6992e73971f24cee46aa31184b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaca025055febe9f4c605bfac12812d0e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aaca025055febe9f4c605bfac12812d0e">set_bkg_palette_entry</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> palette, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> entry, <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> rgb_data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:aaca025055febe9f4c605bfac12812d0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2adcd1b3390b43cdade1b73d95123a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad2adcd1b3390b43cdade1b73d95123a0">set_sprite_palette_entry</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> palette, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> entry, <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> rgb_data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ad2adcd1b3390b43cdade1b73d95123a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cc6bac1f2f0e9f71c7826a3ee8f35d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a5cc6bac1f2f0e9f71c7826a3ee8f35d0">remove_VBL</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a5cc6bac1f2f0e9f71c7826a3ee8f35d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca7413d0441f3ce1f30cca15ce4678ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aca7413d0441f3ce1f30cca15ce4678ab">remove_LCD</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:aca7413d0441f3ce1f30cca15ce4678ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95b3f2754671e9aff7eb86e181d8ab99"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a95b3f2754671e9aff7eb86e181d8ab99">remove_TIM</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a95b3f2754671e9aff7eb86e181d8ab99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44e3fc6c86253db08fa99fdc448b1df0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a44e3fc6c86253db08fa99fdc448b1df0">add_VBL</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a44e3fc6c86253db08fa99fdc448b1df0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad572dce0c703ed78eadcf5cd6cce7dd2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad572dce0c703ed78eadcf5cd6cce7dd2">add_LCD</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ad572dce0c703ed78eadcf5cd6cce7dd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0cfd2f31b0dc3f15ef7c1305e383676"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad0cfd2f31b0dc3f15ef7c1305e383676">add_TIM</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ad0cfd2f31b0dc3f15ef7c1305e383676"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade75173639b6e7be241b8eb31fe825ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ade75173639b6e7be241b8eb31fe825ef">mode</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> m) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ade75173639b6e7be241b8eb31fe825ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abac3c04dc3c056618aca0a0052f2cb93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#abac3c04dc3c056618aca0a0052f2cb93">get_mode</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:abac3c04dc3c056618aca0a0052f2cb93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4093fb5f45f807fe8d4a45121f3fffc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a4093fb5f45f807fe8d4a45121f3fffc5">get_system</a> (void)</td></tr>
<tr class="separator:a4093fb5f45f807fe8d4a45121f3fffc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a206e8e54468237daed636cad12a70055"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a206e8e54468237daed636cad12a70055">delay</a> (<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="el" href="sms_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">d</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a206e8e54468237daed636cad12a70055"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8feed006393f8c8c070b2d29d91ec8aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a8feed006393f8c8c070b2d29d91ec8aa">joypad</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a8feed006393f8c8c070b2d29d91ec8aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0029224262fa919f42f3337c298bda10"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a0029224262fa919f42f3337c298bda10">waitpad</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> mask) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a0029224262fa919f42f3337c298bda10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae192e07aabd7c8b822db52c9bc1e542d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae192e07aabd7c8b822db52c9bc1e542d">waitpadup</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ae192e07aabd7c8b822db52c9bc1e542d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54e98484026ce279ea5d3d0d7a3fb87a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a54e98484026ce279ea5d3d0d7a3fb87a">joypad_init</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> npads, <a class="el" href="structjoypads__t.html">joypads_t</a> *joypads) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a54e98484026ce279ea5d3d0d7a3fb87a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3ee931a6c78c8716cadfedd9f627b6e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#af3ee931a6c78c8716cadfedd9f627b6e">joypad_ex</a> (<a class="el" href="structjoypads__t.html">joypads_t</a> *joypads) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:af3ee931a6c78c8716cadfedd9f627b6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a232883ed798bce00a03b09705c67deef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a232883ed798bce00a03b09705c67deef">enable_interrupts</a> (void)</td></tr>
<tr class="separator:a232883ed798bce00a03b09705c67deef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b17818c7916bc2ff75196ff0627b1e9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a2b17818c7916bc2ff75196ff0627b1e9">disable_interrupts</a> (void)</td></tr>
<tr class="separator:a2b17818c7916bc2ff75196ff0627b1e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a188c65cfeab067cc2b6dcbc97bf24a82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> flags) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a188c65cfeab067cc2b6dcbc97bf24a82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aea9deb2a0bfea9ff05a898f4822e31"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a3aea9deb2a0bfea9ff05a898f4822e31">reset</a> (void)</td></tr>
<tr class="separator:a3aea9deb2a0bfea9ff05a898f4822e31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73b4e18d7f5eaf5398bf0241c9c21586"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a73b4e18d7f5eaf5398bf0241c9c21586">vsync</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a73b4e18d7f5eaf5398bf0241c9c21586"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64538fb78ce148a1a7045245f084a710"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a64538fb78ce148a1a7045245f084a710">wait_vbl_done</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a64538fb78ce148a1a7045245f084a710"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42756a31babdcb4b7e692960a069b13b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a42756a31babdcb4b7e692960a069b13b">display_on</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a42756a31babdcb4b7e692960a069b13b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98aab5a3d75429f9e7861a8100629782"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a98aab5a3d75429f9e7861a8100629782">display_off</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a98aab5a3d75429f9e7861a8100629782"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70802f5e313285aa3ea04b0f73b2700f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a70802f5e313285aa3ea04b0f73b2700f">refresh_OAM</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a70802f5e313285aa3ea04b0f73b2700f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49635449fc261be2481b72d0165f12ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a49635449fc261be2481b72d0165f12ad">set_vram_byte</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *addr, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> v) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a49635449fc261be2481b72d0165f12ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa81b3eb2f6ec56d70ccd27c7deae4098"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aa81b3eb2f6ec56d70ccd27c7deae4098">get_bkg_xy_addr</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:aa81b3eb2f6ec56d70ccd27c7deae4098"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa224c9bac27c7fd268e62bdf33338a84"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aa224c9bac27c7fd268e62bdf33338a84">set_2bpp_palette</a> (<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> palette)</td></tr>
<tr class="separator:aa224c9bac27c7fd268e62bdf33338a84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a050b8b27fe6af3efcc17cd804f808d7a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a050b8b27fe6af3efcc17cd804f808d7a">set_1bpp_colors_ex</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> fgcolor, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> bgcolor, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#a3ea524204d839377cf39842eec23e202">mode</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a050b8b27fe6af3efcc17cd804f808d7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcb394299a1033616fc7d2faec8bd6ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> fgcolor, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> bgcolor)</td></tr>
<tr class="separator:adcb394299a1033616fc7d2faec8bd6ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4eb0e4c6c672efdeb49c3cdba2fa4d4a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a4eb0e4c6c672efdeb49c3cdba2fa4d4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d990e45d1cc8e28d98a87b0b9d70ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a92d990e45d1cc8e28d98a87b0b9d70ff">set_bkg_1bpp_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a92d990e45d1cc8e28d98a87b0b9d70ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ab3fa75195d44d8d7e867d4a4cb1131"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a6ab3fa75195d44d8d7e867d4a4cb1131"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0254d6e23d4202cb070b1fe54c6a7210"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a0254d6e23d4202cb070b1fe54c6a7210">set_bkg_attributes_nes16x16</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *attributes) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a0254d6e23d4202cb070b1fe54c6a7210"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8278909fae5ed243e03f8815ac95bab3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a8278909fae5ed243e03f8815ac95bab3">set_bkg_attributes</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *attributes)</td></tr>
<tr class="separator:a8278909fae5ed243e03f8815ac95bab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadba8b700b97ec97dc9c488496619fd9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aadba8b700b97ec97dc9c488496619fd9">set_bkg_submap_attributes_nes16x16</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:aadba8b700b97ec97dc9c488496619fd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34490cffc1e857ac41c880b6bca92c4f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a34490cffc1e857ac41c880b6bca92c4f">set_bkg_submap_attributes</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *attributes, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w)</td></tr>
<tr class="separator:a34490cffc1e857ac41c880b6bca92c4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a811c386cac0df2d260aacb5a43608be5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a811c386cac0df2d260aacb5a43608be5">set_bkg_based_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile)</td></tr>
<tr class="separator:a811c386cac0df2d260aacb5a43608be5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2c9fd8d613ad8ba52227c5a056e56fa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ac2c9fd8d613ad8ba52227c5a056e56fa">set_bkg_submap</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ac2c9fd8d613ad8ba52227c5a056e56fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc8bc5808620a9717263b8c9ec2237f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#abc8bc5808620a9717263b8c9ec2237f0">set_bkg_based_submap</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile)</td></tr>
<tr class="separator:abc8bc5808620a9717263b8c9ec2237f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8d3e0c6cb1c5687806defef521f8fd2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab8d3e0c6cb1c5687806defef521f8fd2">get_bkg_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ab8d3e0c6cb1c5687806defef521f8fd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31655c4b138654e803e295bd4413759c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a31655c4b138654e803e295bd4413759c">set_bkg_tile_xy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> t) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a31655c4b138654e803e295bd4413759c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b7c27e672467f08097f744f3530bbc7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a7b7c27e672467f08097f744f3530bbc7">set_bkg_attribute_xy_nes16x16</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> a) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a7b7c27e672467f08097f744f3530bbc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cd23c81062d37753a4429b794907524"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a7cd23c81062d37753a4429b794907524">set_bkg_attribute_xy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> a)</td></tr>
<tr class="separator:a7cd23c81062d37753a4429b794907524"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaca04ce3d7213e6d0348196cd592780"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#adaca04ce3d7213e6d0348196cd592780">get_bkg_tile_xy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:adaca04ce3d7213e6d0348196cd592780"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6261537edc74068e3f7f057e6a3e8a57"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a6261537edc74068e3f7f057e6a3e8a57">move_bkg</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y)</td></tr>
<tr class="separator:a6261537edc74068e3f7f057e6a3e8a57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f583f7a880daa6145ca78b086a209d1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a1f583f7a880daa6145ca78b086a209d1">scroll_bkg</a> (<a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> x, <a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> y)</td></tr>
<tr class="separator:a1f583f7a880daa6145ca78b086a209d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc0ef4fa6435ca3a1aac93f533eb85da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#adc0ef4fa6435ca3a1aac93f533eb85da">set_sprite_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:adc0ef4fa6435ca3a1aac93f533eb85da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6372e69db6290fbc0e73244dbe15f903"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a6372e69db6290fbc0e73244dbe15f903">set_sprite_1bpp_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a6372e69db6290fbc0e73244dbe15f903"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e0cdfd6b9a2ae1b7f30384f132d8687"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a7e0cdfd6b9a2ae1b7f30384f132d8687">SET_SHADOW_OAM_ADDRESS</a> (void *address)</td></tr>
<tr class="separator:a7e0cdfd6b9a2ae1b7f30384f132d8687"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d30754c442641bdd882ab595dd77468"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a2d30754c442641bdd882ab595dd77468">set_sprite_tile</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> tile) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a2d30754c442641bdd882ab595dd77468"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58eab770442930dad603ffba2b5d28f3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a58eab770442930dad603ffba2b5d28f3">get_sprite_tile</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a58eab770442930dad603ffba2b5d28f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96b6dd8b1dcb44f540baa6093b54154b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a96b6dd8b1dcb44f540baa6093b54154b">set_sprite_prop</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> prop) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a96b6dd8b1dcb44f540baa6093b54154b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f2058d3fe9c08127fd6f596a5df41c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a7f2058d3fe9c08127fd6f596a5df41c9">get_sprite_prop</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a7f2058d3fe9c08127fd6f596a5df41c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e80bb115f7212eb72a5f341fdc408d7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a3e80bb115f7212eb72a5f341fdc408d7">move_sprite</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a3e80bb115f7212eb72a5f341fdc408d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a552685b6419acf2fa4925a4ab5687be9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a552685b6419acf2fa4925a4ab5687be9">scroll_sprite</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> x, <a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> y) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a552685b6419acf2fa4925a4ab5687be9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92649b68e5fea88d171d933f9a605e50"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a92649b68e5fea88d171d933f9a605e50">hide_sprite</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a92649b68e5fea88d171d933f9a605e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1a305a579576715ad2d8f70327265da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ae1a305a579576715ad2d8f70327265da">set_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *vram_addr, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> len) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ae1a305a579576715ad2d8f70327265da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a399a0430a177e349cc691c5109427c01"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a399a0430a177e349cc691c5109427c01">set_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *vram_addr, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a399a0430a177e349cc691c5109427c01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2539f237ce7da8ff6eb0bad4c8c48a4c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a2539f237ce7da8ff6eb0bad4c8c48a4c">set_tile_data</a> (<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="separator:a2539f237ce7da8ff6eb0bad4c8c48a4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65860edee9a1a70fe56434dca397819e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a65860edee9a1a70fe56434dca397819e">set_bkg_native_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a65860edee9a1a70fe56434dca397819e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c4aa6393c42e2d4079b2f922b9b9c84"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a6c4aa6393c42e2d4079b2f922b9b9c84">set_sprite_native_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a6c4aa6393c42e2d4079b2f922b9b9c84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68651e50243349b48164a8ad983dca4e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a68651e50243349b48164a8ad983dca4e">set_native_tile_data</a> (<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="separator:a68651e50243349b48164a8ad983dca4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4e94bfe39cbe8e1b366d65c13adb464"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ad4e94bfe39cbe8e1b366d65c13adb464">init_bkg</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a>) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:ad4e94bfe39cbe8e1b366d65c13adb464"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b8cf9f9482d5292459ad81d2ef78840"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a2b8cf9f9482d5292459ad81d2ef78840">vmemset</a> (void *s, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a>, <a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> n) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a2b8cf9f9482d5292459ad81d2ef78840"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6879d813b6105ff8d9b36ec55c26a36e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a6879d813b6105ff8d9b36ec55c26a36e">fill_bkg_rect</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> tile) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a6879d813b6105ff8d9b36ec55c26a36e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01ad58154ff5a51a439ffdd1bafe92c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a01ad58154ff5a51a439ffdd1bafe92c5">flush_shadow_attributes</a> (void) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a01ad58154ff5a51a439ffdd1bafe92c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d6c7ed0155e52b62936a04f6d98715d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a7d6c7ed0155e52b62936a04f6d98715d">_switch_prg0</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> bank) NO_OVERLAY_LOCALS</td></tr>
<tr class="separator:a7d6c7ed0155e52b62936a04f6d98715d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a78fd7730ed37db84f52bcfc9ff41873f"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a78fd7730ed37db84f52bcfc9ff41873f">_SYSTEM</a></td></tr>
<tr class="separator:a78fd7730ed37db84f52bcfc9ff41873f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78d2fd18666afec116f176d46debb4e7"><td class="memItemLeft" align="right" valign="top">volatile <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a78d2fd18666afec116f176d46debb4e7">sys_time</a></td></tr>
<tr class="separator:a78d2fd18666afec116f176d46debb4e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06bab3f8bce032de0d21fbd86e14c3f3"><td class="memItemLeft" align="right" valign="top">volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a></td></tr>
<tr class="separator:a06bab3f8bce032de0d21fbd86e14c3f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a250f5339e05523912926be566e9eb8c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a250f5339e05523912926be566e9eb8c0">_current_1bpp_colors</a></td></tr>
<tr class="separator:a250f5339e05523912926be566e9eb8c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa82205e9629f984d0b3dc8055c211522"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#aa82205e9629f984d0b3dc8055c211522">_map_tile_offset</a></td></tr>
<tr class="separator:aa82205e9629f984d0b3dc8055c211522"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab472d9bbb1bcfd141374f5babc71934c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#ab472d9bbb1bcfd141374f5babc71934c">_submap_tile_offset</a></td></tr>
<tr class="separator:ab472d9bbb1bcfd141374f5babc71934c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3619f9cb1e3c92238a033ead79a0c551"><td class="memItemLeft" align="right" valign="top">volatile struct <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a3619f9cb1e3c92238a033ead79a0c551">shadow_OAM</a> []</td></tr>
<tr class="separator:a3619f9cb1e3c92238a033ead79a0c551"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6286d69d5fb1133edd0c01c9545c62e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nes_8h.html#a6286d69d5fb1133edd0c01c9545c62e4">_shadow_OAM_base</a></td></tr>
<tr class="separator:a6286d69d5fb1133edd0c01c9545c62e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>NES specific functions. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a418f95f7c7744aa18840d4101388916a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a418f95f7c7744aa18840d4101388916a">&#9670;&nbsp;</a></span>NINTENDO_NES</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NINTENDO_NES</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a1e73068b3ffdb8436eaa3362f104ba74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e73068b3ffdb8436eaa3362f104ba74">&#9670;&nbsp;</a></span>SYSTEM_BITS_NTSC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_BITS_NTSC&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a599f3df346be94f25498749e2442bde8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a599f3df346be94f25498749e2442bde8">&#9670;&nbsp;</a></span>SYSTEM_BITS_PAL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_BITS_PAL&#160;&#160;&#160;0x40</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa370f208d677a232346ddf00a8ef7243"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa370f208d677a232346ddf00a8ef7243">&#9670;&nbsp;</a></span>SYSTEM_BITS_DENDY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_BITS_DENDY&#160;&#160;&#160;0x80</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a99bca2df4c6fde16a659797b4e584036"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99bca2df4c6fde16a659797b4e584036">&#9670;&nbsp;</a></span>SYSTEM_60HZ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_60HZ&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad6329c19927cf02579e2503e40c0bbde"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6329c19927cf02579e2503e40c0bbde">&#9670;&nbsp;</a></span>SYSTEM_50HZ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_50HZ&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae85f322d3e5c6f1f1ebc934ae22f51ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae85f322d3e5c6f1f1ebc934ae22f51ea">&#9670;&nbsp;</a></span>TIMER_VBLANK_PARITY_MODE_SYSTEM_60HZ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TIMER_VBLANK_PARITY_MODE_SYSTEM_60HZ&#160;&#160;&#160;0x78</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a9a99bab8bac700048df9d8797bed56ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a99bab8bac700048df9d8797bed56ce">&#9670;&nbsp;</a></span>TIMER_VBLANK_PARITY_MODE_SYSTEM_50HZ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TIMER_VBLANK_PARITY_MODE_SYSTEM_50HZ&#160;&#160;&#160;0x5D</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a4a118ad3ee36468a3fa616977a64864e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a118ad3ee36468a3fa616977a64864e">&#9670;&nbsp;</a></span>RGB</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">r, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">g, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="rgb__to__nes__macro_8h.html#aa83d79eaa6230c94a1326b9f88d6b0ad">RGB_TO_NES</a>(((r) | ((g) &lt;&lt; 2) | ((<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &lt;&lt; 4)))</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a7d2ed0f10b2b74123a544327bbfd7564"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d2ed0f10b2b74123a544327bbfd7564">&#9670;&nbsp;</a></span>RGB8</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB8</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">r, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">g, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="rgb__to__nes__macro_8h.html#aa83d79eaa6230c94a1326b9f88d6b0ad">RGB_TO_NES</a>((((r) &gt;&gt; 6) | (((g) &gt;&gt; 6) &lt;&lt; 2) | (((<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 6) &lt;&lt; 4)))</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab5a6e450fcf10402278fe585a421dbbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5a6e450fcf10402278fe585a421dbbd">&#9670;&nbsp;</a></span>RGBHTML</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGBHTML</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">RGB24bit</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="rgb__to__nes__macro_8h.html#aa83d79eaa6230c94a1326b9f88d6b0ad">RGB_TO_NES</a>((((RGB24bit) &gt;&gt; 22) | ((((RGB24bit) &amp; 0xFFFF) &gt;&gt; 14) &lt;&lt; 2) | ((((RGB24bit) &amp; 0xFF) &gt;&gt; 6) &lt;&lt; 4)))</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa039288455af8a3812a35aa1e7b903e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa039288455af8a3812a35aa1e7b903e4">&#9670;&nbsp;</a></span>RGB_RED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_RED&#160;&#160;&#160;0x16</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Common colors based on the EGA default palette.</p>
<p>Manually entered from <a href="https://www.nesdev.org/wiki/PPU_palettes#RGBI">https://www.nesdev.org/wiki/PPU_palettes#RGBI</a> </p>

</div>
</div>
<a id="ae29b6947ac7dca7db513e59f1cfcbf51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae29b6947ac7dca7db513e59f1cfcbf51">&#9670;&nbsp;</a></span>RGB_DARKRED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_DARKRED&#160;&#160;&#160;0x06</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab6c97468034c02fe204fd37036d9be15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6c97468034c02fe204fd37036d9be15">&#9670;&nbsp;</a></span>RGB_GREEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_GREEN&#160;&#160;&#160;0x2A</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a1ee7a5d8fd635e9132a2820a60f9789d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ee7a5d8fd635e9132a2820a60f9789d">&#9670;&nbsp;</a></span>RGB_DARKGREEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_DARKGREEN&#160;&#160;&#160;0x1A</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a0eff802f1ca228046476209dc01c76ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0eff802f1ca228046476209dc01c76ad">&#9670;&nbsp;</a></span>RGB_BLUE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_BLUE&#160;&#160;&#160;0x12</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad44385fc245bbabf6da787dcc8930385"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad44385fc245bbabf6da787dcc8930385">&#9670;&nbsp;</a></span>RGB_DARKBLUE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_DARKBLUE&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad74a18fca945f257dc9d1b99f9edbd40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad74a18fca945f257dc9d1b99f9edbd40">&#9670;&nbsp;</a></span>RGB_YELLOW</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_YELLOW&#160;&#160;&#160;0x28</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a2727da9f8c0b09a67375575a00186e2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2727da9f8c0b09a67375575a00186e2a">&#9670;&nbsp;</a></span>RGB_DARKYELLOW</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_DARKYELLOW&#160;&#160;&#160;0x18</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a2ce30ac984869b55594447722b9d0579"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ce30ac984869b55594447722b9d0579">&#9670;&nbsp;</a></span>RGB_CYAN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_CYAN&#160;&#160;&#160;0x2C</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae4fe0c6cfa46b0c4804425f23bb48f4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4fe0c6cfa46b0c4804425f23bb48f4c">&#9670;&nbsp;</a></span>RGB_AQUA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_AQUA&#160;&#160;&#160;0x1C</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a59fb596d3d65cfc4d3cb7e5044b8b10a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59fb596d3d65cfc4d3cb7e5044b8b10a">&#9670;&nbsp;</a></span>RGB_PINK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_PINK&#160;&#160;&#160;0x24</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a9d5a5f880df6bd4b64e6546839d41101"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d5a5f880df6bd4b64e6546839d41101">&#9670;&nbsp;</a></span>RGB_PURPLE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_PURPLE&#160;&#160;&#160;0x14</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae168f0f9864d4ed4be7807b9783f17f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae168f0f9864d4ed4be7807b9783f17f1">&#9670;&nbsp;</a></span>RGB_BLACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_BLACK&#160;&#160;&#160;0x0F</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a29b47e2361025eabcdc3bcbff2308044"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29b47e2361025eabcdc3bcbff2308044">&#9670;&nbsp;</a></span>RGB_DARKGRAY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_DARKGRAY&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a80efbf7b13421922fb174f3e6a3e235c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80efbf7b13421922fb174f3e6a3e235c">&#9670;&nbsp;</a></span>RGB_LIGHTGRAY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_LIGHTGRAY&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ac1771f95d9887118764bd8a074e537e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1771f95d9887118764bd8a074e537e1">&#9670;&nbsp;</a></span>RGB_WHITE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RGB_WHITE&#160;&#160;&#160;0x30</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a05ca817ab32f6da612c3ae26db5abf02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05ca817ab32f6da612c3ae26db5abf02">&#9670;&nbsp;</a></span>J_UP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_UP&#160;&#160;&#160;0x08U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Joypad bits. A logical OR of these is used in the wait_pad and joypad functions. For example, to see if the B button is pressed try</p>
<p>uint8_t keys; keys = <a class="el" href="nes_8h.html#a8feed006393f8c8c070b2d29d91ec8aa">joypad()</a>; if (keys &amp; J_B) { ... }</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a8feed006393f8c8c070b2d29d91ec8aa">joypad</a> </dd></dl>

</div>
</div>
<a id="ae032c5c544196e37ec0432f6cfad7904"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae032c5c544196e37ec0432f6cfad7904">&#9670;&nbsp;</a></span>J_DOWN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_DOWN&#160;&#160;&#160;0x04U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ac70894fecac30c1ca9917f07373cf81c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac70894fecac30c1ca9917f07373cf81c">&#9670;&nbsp;</a></span>J_LEFT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_LEFT&#160;&#160;&#160;0x02U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a3bad91d11ae09ffcbb3cb0a81873d325"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bad91d11ae09ffcbb3cb0a81873d325">&#9670;&nbsp;</a></span>J_RIGHT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_RIGHT&#160;&#160;&#160;0x01U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a31af766e3b598eb7a6b63f55a4988e7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31af766e3b598eb7a6b63f55a4988e7a">&#9670;&nbsp;</a></span>J_A</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_A&#160;&#160;&#160;0x80U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae47e59a309120f9420993f26816b5e6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae47e59a309120f9420993f26816b5e6d">&#9670;&nbsp;</a></span>J_B</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_B&#160;&#160;&#160;0x40U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab416a9d96d1582490828f4bac78a8b5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab416a9d96d1582490828f4bac78a8b5b">&#9670;&nbsp;</a></span>J_SELECT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_SELECT&#160;&#160;&#160;0x20U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab769c6e20778298be8bc3321476ceb53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab769c6e20778298be8bc3321476ceb53">&#9670;&nbsp;</a></span>J_START</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_START&#160;&#160;&#160;0x10U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="acc9798fc62b5d626c91c8b0f20b522ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc9798fc62b5d626c91c8b0f20b522ff">&#9670;&nbsp;</a></span>M_DRAWING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_DRAWING&#160;&#160;&#160;0x01U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Screen modes. Normally used by internal functions only. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#ade75173639b6e7be241b8eb31fe825ef">mode()</a> </dd></dl>

</div>
</div>
<a id="af0e30d6af308ffe5a025fbe85da40f6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0e30d6af308ffe5a025fbe85da40f6f">&#9670;&nbsp;</a></span>M_TEXT_OUT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_TEXT_OUT&#160;&#160;&#160;0x02U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a908826e7180f94a5988ceb8633313a2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a908826e7180f94a5988ceb8633313a2e">&#9670;&nbsp;</a></span>M_TEXT_INOUT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_TEXT_INOUT&#160;&#160;&#160;0x03U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a04382de20738146fe873ddfb0585052b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04382de20738146fe873ddfb0585052b">&#9670;&nbsp;</a></span>M_NO_SCROLL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_NO_SCROLL&#160;&#160;&#160;0x04U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set this in addition to the others to disable scrolling</p>
<p>If scrolling is disabled, the cursor returns to (0,0) </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#ade75173639b6e7be241b8eb31fe825ef">mode()</a> </dd></dl>

</div>
</div>
<a id="aca2855edd2d28f66be551a0f7ec23f07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca2855edd2d28f66be551a0f7ec23f07">&#9670;&nbsp;</a></span>M_NO_INTERP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_NO_INTERP&#160;&#160;&#160;0x08U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set this to disable interpretation </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#ade75173639b6e7be241b8eb31fe825ef">mode()</a> </dd></dl>

</div>
</div>
<a id="a54572cf6791463b6d60623837e0bb5a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54572cf6791463b6d60623837e0bb5a6">&#9670;&nbsp;</a></span>S_PALETTE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_PALETTE&#160;&#160;&#160;0x10U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If this is set, sprite colours come from OBJ1PAL. Else they come from OBJ0PAL </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a96b6dd8b1dcb44f540baa6093b54154b">set_sprite_prop()</a>. </dd></dl>

</div>
</div>
<a id="ae97793b4039609f93b0f7f8bddb18011"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae97793b4039609f93b0f7f8bddb18011">&#9670;&nbsp;</a></span>S_FLIPX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_FLIPX&#160;&#160;&#160;0x40U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If set the sprite will be flipped horizontally. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a96b6dd8b1dcb44f540baa6093b54154b">set_sprite_prop()</a> </dd></dl>

</div>
</div>
<a id="a4bbb9cd6c38b2317de5256d1d889c63b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bbb9cd6c38b2317de5256d1d889c63b">&#9670;&nbsp;</a></span>S_FLIPY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_FLIPY&#160;&#160;&#160;0x80U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If set the sprite will be flipped vertically. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a96b6dd8b1dcb44f540baa6093b54154b">set_sprite_prop()</a> </dd></dl>

</div>
</div>
<a id="a9506d04c2ec7d2442a52054f67d2b32f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9506d04c2ec7d2442a52054f67d2b32f">&#9670;&nbsp;</a></span>S_PRIORITY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_PRIORITY&#160;&#160;&#160;0x20U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If this bit is clear, then the sprite will be displayed on top of the background and window. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a96b6dd8b1dcb44f540baa6093b54154b">set_sprite_prop()</a> </dd></dl>

</div>
</div>
<a id="a826169925ff12d52f0a0d51f14d2936b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a826169925ff12d52f0a0d51f14d2936b">&#9670;&nbsp;</a></span>S_PAL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_PAL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">n</td><td>)</td>
          <td>&#160;&#160;&#160;n</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Defines how palette number is encoded in OAM. Required for the png2asset tool's metasprite output. </p>

</div>
</div>
<a id="aa027abe630d44039f238034bcb2d2f36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa027abe630d44039f238034bcb2d2f36">&#9670;&nbsp;</a></span>EMPTY_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EMPTY_IFLAG&#160;&#160;&#160;0x00U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disable calling of interrupt service routines </p>

</div>
</div>
<a id="a2ca7720b9a5da9b2173e1f74dba85541"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ca7720b9a5da9b2173e1f74dba85541">&#9670;&nbsp;</a></span>VBL_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VBL_IFLAG&#160;&#160;&#160;0x01U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>VBlank Interrupt occurs at the start of the vertical blank.</p>
<p>During this period the video ram may be freely accessed. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts()</a>, </dd>
<dd>
<a class="el" href="nes_8h.html#a44e3fc6c86253db08fa99fdc448b1df0">add_VBL</a> </dd></dl>

</div>
</div>
<a id="a61a9e2910380de6abb34df14ef634eb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61a9e2910380de6abb34df14ef634eb4">&#9670;&nbsp;</a></span>LCD_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LCD_IFLAG&#160;&#160;&#160;0x02U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>LCD Interrupt when triggered by the STAT register. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts()</a>, </dd>
<dd>
<a class="el" href="nes_8h.html#ad572dce0c703ed78eadcf5cd6cce7dd2">add_LCD</a> </dd></dl>

</div>
</div>
<a id="a604256210ec5b90b68185e1a18efab49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a604256210ec5b90b68185e1a18efab49">&#9670;&nbsp;</a></span>TIM_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TIM_IFLAG&#160;&#160;&#160;0x04U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Timer Interrupt when the timer <a class="el" href="sms_2hardware_8h.html#a4741a62d05deefc649df160baca326dd">TIMA_REG</a> overflows. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts()</a>, </dd>
<dd>
<a class="el" href="nes_8h.html#ad0cfd2f31b0dc3f15ef7c1305e383676">add_TIM</a> </dd></dl>

</div>
</div>
<a id="ab311e53739c992294ae07ca506a924ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab311e53739c992294ae07ca506a924ad">&#9670;&nbsp;</a></span>DMG_BLACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_BLACK&#160;&#160;&#160;0x03</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a45d13a674e169dd83df7e1f46513ccba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45d13a674e169dd83df7e1f46513ccba">&#9670;&nbsp;</a></span>DMG_DARK_GRAY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_DARK_GRAY&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a8ccd6732d3bdf390cc0943e8567341f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ccd6732d3bdf390cc0943e8567341f3">&#9670;&nbsp;</a></span>DMG_LITE_GRAY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_LITE_GRAY&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a11cedc2ee58acfbbfc48dfb2b9a551b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11cedc2ee58acfbbfc48dfb2b9a551b3">&#9670;&nbsp;</a></span>DMG_WHITE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_WHITE&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a9727caafc483ba6ec65e9344b033d684"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9727caafc483ba6ec65e9344b033d684">&#9670;&nbsp;</a></span>DMG_PALETTE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_PALETTE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C0, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C2, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C3&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((((C3) &amp; 0x03) &lt;&lt; 6) | (((C2) &amp; 0x03) &lt;&lt; 4) | (((C1) &amp; 0x03) &lt;&lt; 2) | ((C0) &amp; 0x03)))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Macro to create a DMG palette from 4 colors</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C0</td><td>Color for Index 0 </td></tr>
    <tr><td class="paramname">C1</td><td>Color for Index 1 </td></tr>
    <tr><td class="paramname">C2</td><td>Color for Index 2 </td></tr>
    <tr><td class="paramname">C3</td><td>Color for Index 3</td></tr>
  </table>
  </dd>
</dl>
<p>The resulting format is four greyscale colors packed into a single unsigned byte.</p>
<p>Example: </p><div class="fragment"><div class="line">REG_BGP = <a class="code" href="gb_8h.html#a9727caafc483ba6ec65e9344b033d684">DMG_PALETTE</a>(<a class="code" href="gb_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a>, <a class="code" href="gb_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a>, <a class="code" href="gb_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a>, <a class="code" href="gb_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a>);</div>
<div class="ttc" id="agb_8h_html_a11cedc2ee58acfbbfc48dfb2b9a551b3"><div class="ttname"><a href="gb_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a></div><div class="ttdeci">#define DMG_WHITE</div><div class="ttdef"><b>Definition:</b> gb.h:139</div></div>
<div class="ttc" id="agb_8h_html_a45d13a674e169dd83df7e1f46513ccba"><div class="ttname"><a href="gb_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a></div><div class="ttdeci">#define DMG_DARK_GRAY</div><div class="ttdef"><b>Definition:</b> gb.h:137</div></div>
<div class="ttc" id="agb_8h_html_a8ccd6732d3bdf390cc0943e8567341f3"><div class="ttname"><a href="gb_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a></div><div class="ttdeci">#define DMG_LITE_GRAY</div><div class="ttdef"><b>Definition:</b> gb.h:138</div></div>
<div class="ttc" id="agb_8h_html_a9727caafc483ba6ec65e9344b033d684"><div class="ttname"><a href="gb_8h.html#a9727caafc483ba6ec65e9344b033d684">DMG_PALETTE</a></div><div class="ttdeci">#define DMG_PALETTE(C0, C1, C2, C3)</div><div class="ttdef"><b>Definition:</b> gb.h:159</div></div>
<div class="ttc" id="agb_8h_html_ab311e53739c992294ae07ca506a924ad"><div class="ttname"><a href="gb_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a></div><div class="ttdeci">#define DMG_BLACK</div><div class="ttdef"><b>Definition:</b> gb.h:136</div></div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_2hardware_8h.html#a13f3e89f7b92258d825292e5058815c7">OBP0_REG</a>, <a class="el" href="gb_2hardware_8h.html#a9da545164e049ef773128f869daece13">OBP1_REG</a>, <a class="el" href="gb_2hardware_8h.html#af577ba87ec3d13d7415e4c4a53cdf997">BGP_REG</a> </dd>
<dd>
<a class="el" href="nes_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a>, <a class="el" href="nes_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a>, <a class="el" href="nes_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a>, <a class="el" href="nes_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a> </dd></dl>

</div>
</div>
<a id="ada0cc738d27aad251151e69cb8d250e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada0cc738d27aad251151e69cb8d250e1">&#9670;&nbsp;</a></span>SCREENWIDTH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SCREENWIDTH&#160;&#160;&#160;<a class="el" href="sms_2hardware_8h.html#ad14c51cdfb347c34c364f54e67dc978d">DEVICE_SCREEN_PX_WIDTH</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Width of the visible screen in pixels. </p>

</div>
</div>
<a id="ae189e98d0ef9263c37869ce1ff3710a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae189e98d0ef9263c37869ce1ff3710a5">&#9670;&nbsp;</a></span>SCREENHEIGHT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SCREENHEIGHT&#160;&#160;&#160;<a class="el" href="sms_2hardware_8h.html#a7bd450aa268b881257089cf8cd6697ec">DEVICE_SCREEN_PX_HEIGHT</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Height of the visible screen in pixels. </p>

</div>
</div>
<a id="a00573fe55b0f1e2dd03b9647dfe15636"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00573fe55b0f1e2dd03b9647dfe15636">&#9670;&nbsp;</a></span>MAX_LCD_ISR_CALLS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_LCD_ISR_CALLS&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The maximum number of times the LCD handler will be called per frame. </p>

</div>
</div>
<a id="ae042588f20bf5a2349c8ad8716245233"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae042588f20bf5a2349c8ad8716245233">&#9670;&nbsp;</a></span>CURRENT_BANK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CURRENT_BANK&#160;&#160;&#160;<a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a42705001e2b9897f5167b67fb36c69dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42705001e2b9897f5167b67fb36c69dd">&#9670;&nbsp;</a></span>BANK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BANK</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">VARNAME</td><td>)</td>
          <td>&#160;&#160;&#160;( (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>) &amp; __bank_ ## VARNAME )</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Obtains the <b>bank number</b> of VARNAME</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VARNAME</td><td>Name of the variable which has a __bank_VARNAME companion symbol which is adjusted by bankpack</td></tr>
  </table>
  </dd>
</dl>
<p>Use this to obtain the bank number from a bank reference created with <a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a261bba55a07b802baf99346feadd9852">BANKREF_EXTERN()</a>, <a class="el" href="nes_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a> </dd></dl>

</div>
</div>
<a id="a086293f2afb4c7945460a4496b20aea3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a086293f2afb4c7945460a4496b20aea3">&#9670;&nbsp;</a></span>BANKREF</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BANKREF</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">VARNAME</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordtype">void</span> __func_ ## VARNAME(<span class="keywordtype">void</span>) __banked __naked { \</div>
<div class="line">__asm \</div>
<div class="line">    .local b___func_ ## VARNAME \</div>
<div class="line">    ___bank_ ## VARNAME = b___func_ ## VARNAME \</div>
<div class="line">    .globl ___bank_ ## VARNAME \</div>
<div class="line">__endasm; \</div>
<div class="line">}</div>
</div><!-- fragment --><p>Creates a reference for retrieving the bank number of a variable or function</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VARNAME</td><td>Variable name to use, which may be an existing identifier</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a42705001e2b9897f5167b67fb36c69dd">BANK()</a> for obtaining the bank number of the included data.</dd></dl>
<p>More than one <code><a class="el" href="nes_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a></code> may be created per file, but each call should always use a unique VARNAME.</p>
<p>Use <a class="el" href="gb_8h.html#a261bba55a07b802baf99346feadd9852">BANKREF_EXTERN()</a> within another source file to make the variable and it's data accesible there. </p>

</div>
</div>
<a id="a261bba55a07b802baf99346feadd9852"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a261bba55a07b802baf99346feadd9852">&#9670;&nbsp;</a></span>BANKREF_EXTERN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BANKREF_EXTERN</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">VARNAME</td><td>)</td>
          <td>&#160;&#160;&#160;extern const void __bank_ ## VARNAME;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates extern references for accessing a <a class="el" href="nes_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a> generated variable.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VARNAME</td><td>Name of the variable used with <a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a></td></tr>
  </table>
  </dd>
</dl>
<p>This makes a <a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a> reference in another source file accessible in the current file for use with <a class="el" href="gb_8h.html#a42705001e2b9897f5167b67fb36c69dd">BANK()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a>, <a class="el" href="nes_8h.html#a42705001e2b9897f5167b67fb36c69dd">BANK()</a> </dd></dl>

</div>
</div>
<a id="a412db28bcf6bda7f235d7c5d3c9d52c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a412db28bcf6bda7f235d7c5d3c9d52c0">&#9670;&nbsp;</a></span>SWITCH_ROM_DUMMY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_ROM_DUMMY</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Dummy macro for no-bank-switching WIP prototype </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>ROM bank to switch to </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2d29df5dc3791dbf77488b3322b71d6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d29df5dc3791dbf77488b3322b71d6c">&#9670;&nbsp;</a></span>SWITCH_ROM_UNROM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_ROM_UNROM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a7d6c7ed0155e52b62936a04f6d98715d">_switch_prg0</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Macro for simple UNROM-like switching (write bank# to single 8-bit register) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>ROM bank to switch to </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1e22a3b60368bb5f3705d625ac2d09cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e22a3b60368bb5f3705d625ac2d09cc">&#9670;&nbsp;</a></span>SWITCH_ROM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_ROM&#160;&#160;&#160;<a class="el" href="nes_8h.html#a2d29df5dc3791dbf77488b3322b71d6c">SWITCH_ROM_UNROM</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes default mapper switch the active ROM bank </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>ROM bank to switch to (max 255)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a2d29df5dc3791dbf77488b3322b71d6c">SWITCH_ROM_UNROM</a> </dd></dl>

</div>
</div>
<a id="a121feb0c32d124562f52398aa9656e7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a121feb0c32d124562f52398aa9656e7b">&#9670;&nbsp;</a></span>SWITCH_RAM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_RAM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>No-op at the moment. Placeholder for future mappers / test compatibility. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>SRAM bank to switch to </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0e9c88657beaac946231a4801481b97f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e9c88657beaac946231a4801481b97f">&#9670;&nbsp;</a></span>ENABLE_RAM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENABLE_RAM</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>No-op at the moment. Placeholder for future mappers / test compatibility. </p>

</div>
</div>
<a id="a649d27b5587de16a66176e03a1b8ebd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a649d27b5587de16a66176e03a1b8ebd5">&#9670;&nbsp;</a></span>DISABLE_RAM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISABLE_RAM</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>No-op at the moment. Placeholder for future mappers / test compatibility. </p>

</div>
</div>
<a id="a5ae6b05b3e1559c97f0d1b2daaaa0ee4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">&#9670;&nbsp;</a></span>DISPLAY_ON</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISPLAY_ON&#160;&#160;&#160;  <a class="el" href="nes_8h.html#a42756a31babdcb4b7e692960a069b13b">display_on</a>();</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns the display back on. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a98aab5a3d75429f9e7861a8100629782">display_off</a>, <a class="el" href="nes_8h.html#ad2ec9831813c5e7069917aa4455af682">DISPLAY_OFF</a> </dd></dl>

</div>
</div>
<a id="ad2ec9831813c5e7069917aa4455af682"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2ec9831813c5e7069917aa4455af682">&#9670;&nbsp;</a></span>DISPLAY_OFF</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISPLAY_OFF&#160;&#160;&#160;  <a class="el" href="sms_8h.html#afe5714734a8fea7b1617ba377b3c0a06">display_off</a>();</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns the display off immediately. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a98aab5a3d75429f9e7861a8100629782">display_off</a>, <a class="el" href="nes_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a> </dd></dl>

</div>
</div>
<a id="a0659212acd317ccdebc0ecf435df330f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0659212acd317ccdebc0ecf435df330f">&#9670;&nbsp;</a></span>HIDE_LEFT_COLUMN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HIDE_LEFT_COLUMN&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> &amp;= ~(<a class="el" href="nes_2hardware_8h.html#a0921fb5a3bfa138b479df91189d51f1c">PPUMASK_SHOW_BG_LC</a> | <a class="el" href="nes_2hardware_8h.html#add0805a7bbaa88cf568f7a8fa7eb252c">PPUMASK_SHOW_SPR_LC</a>); \</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Blanks leftmost column, so it is not garbaged when you use horizontal scroll </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a5497c2255a9474d397446710189eacbe">SHOW_LEFT_COLUMN</a> </dd></dl>

</div>
</div>
<a id="a5497c2255a9474d397446710189eacbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5497c2255a9474d397446710189eacbe">&#9670;&nbsp;</a></span>SHOW_LEFT_COLUMN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SHOW_LEFT_COLUMN&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> |= (<a class="el" href="nes_2hardware_8h.html#a0921fb5a3bfa138b479df91189d51f1c">PPUMASK_SHOW_BG_LC</a> | <a class="el" href="nes_2hardware_8h.html#add0805a7bbaa88cf568f7a8fa7eb252c">PPUMASK_SHOW_SPR_LC</a>);</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Shows leftmost column </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a0659212acd317ccdebc0ecf435df330f">HIDE_LEFT_COLUMN</a> </dd></dl>

</div>
</div>
<a id="a3f3f7bd5879b807acbb203ce2aaa1e5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f3f7bd5879b807acbb203ce2aaa1e5d">&#9670;&nbsp;</a></span>SET_BORDER_COLOR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SET_BORDER_COLOR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Does nothing for NES not implemented yet </p>

</div>
</div>
<a id="a8e3f36aa68ac036695816757f2a1322c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e3f36aa68ac036695816757f2a1322c">&#9670;&nbsp;</a></span>SHOW_BKG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SHOW_BKG&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> |= <a class="el" href="nes_2hardware_8h.html#aaf30bd58f6f863e21f605957d547bdd7">PPUMASK_SHOW_BG</a>;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns on the background layer. Sets bit 0 of the LCDC register to 1. </p>

</div>
</div>
<a id="a6d25f7c43b1cbbb48b95cda7ab2c3141"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d25f7c43b1cbbb48b95cda7ab2c3141">&#9670;&nbsp;</a></span>HIDE_BKG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HIDE_BKG&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> &amp;= ~<a class="el" href="nes_2hardware_8h.html#aaf30bd58f6f863e21f605957d547bdd7">PPUMASK_SHOW_BG</a>;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns off the background layer. Sets bit 0 of the LCDC register to 0. </p>

</div>
</div>
<a id="a495bc9f405f916f02ad5d97e6e730134"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a495bc9f405f916f02ad5d97e6e730134">&#9670;&nbsp;</a></span>SHOW_SPRITES</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SHOW_SPRITES&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> |= <a class="el" href="nes_2hardware_8h.html#a73dfa1e321b7b5a3835450c0382f7779">PPUMASK_SHOW_SPR</a>;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns on the sprites layer. Sets bit 1 of the LCDC register to 1. </p>

</div>
</div>
<a id="a69ef98aee664b8abd8d1a3d45f016dda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69ef98aee664b8abd8d1a3d45f016dda">&#9670;&nbsp;</a></span>HIDE_SPRITES</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HIDE_SPRITES&#160;&#160;&#160;    <a class="el" href="nes_2hardware_8h.html#a179ba142ebf05f2d0d2df6c47da2f6b4">shadow_PPUMASK</a> &amp;= ~<a class="el" href="nes_2hardware_8h.html#a73dfa1e321b7b5a3835450c0382f7779">PPUMASK_SHOW_SPR</a>;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns off the sprites layer. Clears bit 1 of the LCDC register to 0. </p>

</div>
</div>
<a id="af91d252f07f4764996154820f970c101"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af91d252f07f4764996154820f970c101">&#9670;&nbsp;</a></span>SPRITES_8x16</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPRITES_8x16&#160;&#160;&#160;  <a class="el" href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a> |= <a class="el" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a>;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets sprite size to 8x16 pixels, two tiles one above the other. Sets bit 2 of the LCDC register to 1. </p>

</div>
</div>
<a id="aa87bec0d134136fdb727f52cb773b792"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa87bec0d134136fdb727f52cb773b792">&#9670;&nbsp;</a></span>SPRITES_8x8</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPRITES_8x8&#160;&#160;&#160;  <a class="el" href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a> &amp;= ~<a class="el" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a>;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets sprite size to 8x8 pixels, one tile. Clears bit 2 of the LCDC register to 0. </p>

</div>
</div>
<a id="a67f80e65620470b55a4950e2966eb868"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67f80e65620470b55a4950e2966eb868">&#9670;&nbsp;</a></span>COMPAT_PALETTE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COMPAT_PALETTE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C0, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C2, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C3&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)(((C3) &lt;&lt; 6) | ((C2) &lt;&lt; 4) | ((C1) &lt;&lt; 2) | (C0)))</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab94bfec130df50d9cb808142f94603a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab94bfec130df50d9cb808142f94603a5">&#9670;&nbsp;</a></span>set_bkg_2bpp_data</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_bkg_2bpp_data&#160;&#160;&#160;<a class="el" href="sms_8h.html#a8130306da1177f4fef89e699f8e2add4">set_bkg_data</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a55f82ff980398dd97036fd936ebd727e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55f82ff980398dd97036fd936ebd727e">&#9670;&nbsp;</a></span>set_tile_map</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_tile_map&#160;&#160;&#160;<a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="adb5d0970167b81401113812773c90838"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb5d0970167b81401113812773c90838">&#9670;&nbsp;</a></span>set_tile_submap</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_tile_submap&#160;&#160;&#160;<a class="el" href="sms_8h.html#a0cfd261bc7a94b1f6093f423bad30298">set_bkg_submap</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a3b235c526c517fb02d20cdea780ee2c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b235c526c517fb02d20cdea780ee2c5">&#9670;&nbsp;</a></span>set_tile_xy</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_tile_xy&#160;&#160;&#160;<a class="el" href="nes_8h.html#a31655c4b138654e803e295bd4413759c">set_bkg_tile_xy</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad7a73323735000cf26196e073cbbdcbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7a73323735000cf26196e073cbbdcbf">&#9670;&nbsp;</a></span>set_attribute_xy</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_attribute_xy&#160;&#160;&#160;<a class="el" href="nes_8h.html#a7cd23c81062d37753a4429b794907524">set_bkg_attribute_xy</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a43b4f0ba65856deef626c0d9e7e41ed4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43b4f0ba65856deef626c0d9e7e41ed4">&#9670;&nbsp;</a></span>set_sprite_2bpp_data</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_sprite_2bpp_data&#160;&#160;&#160;<a class="el" href="sms_8h.html#a216a3e3d320ee4d8cf4845600487ae39">set_sprite_data</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a47607089a434dcda7a8583cfca03b604"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47607089a434dcda7a8583cfca03b604">&#9670;&nbsp;</a></span>DISABLE_OAM_DMA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISABLE_OAM_DMA&#160;&#160;&#160;    <a class="el" href="sms_8h.html#a5435fd985412934e96a490e103c6bc49">_shadow_OAM_base</a> = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="abfd70bf31185a4900680977c9fb5a5ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfd70bf31185a4900680977c9fb5a5ec">&#9670;&nbsp;</a></span>DISABLE_VBL_TRANSFER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISABLE_VBL_TRANSFER&#160;&#160;&#160;<a class="el" href="nes_8h.html#a47607089a434dcda7a8583cfca03b604">DISABLE_OAM_DMA</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disable OAM DMA copy each VBlank </p>

</div>
</div>
<a id="a20895d53fe9caacb08ce8b071d57ce53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20895d53fe9caacb08ce8b071d57ce53">&#9670;&nbsp;</a></span>ENABLE_OAM_DMA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENABLE_OAM_DMA&#160;&#160;&#160;    <a class="el" href="sms_8h.html#a5435fd985412934e96a490e103c6bc49">_shadow_OAM_base</a> = (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)&amp;<a class="el" href="sms_8h.html#af02f9e73bd894cc25e03aedb0a10a91d">shadow_OAM</a> &gt;&gt; 8)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a77d516c9d3f86f100eddea5e0d133a76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77d516c9d3f86f100eddea5e0d133a76">&#9670;&nbsp;</a></span>ENABLE_VBL_TRANSFER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENABLE_VBL_TRANSFER&#160;&#160;&#160;<a class="el" href="nes_8h.html#a20895d53fe9caacb08ce8b071d57ce53">ENABLE_OAM_DMA</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable OAM DMA copy each VBlank and set it to transfer default shadow_OAM array </p>

</div>
</div>
<a id="a8b77608c87a9aef65a03531482b2163b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b77608c87a9aef65a03531482b2163b">&#9670;&nbsp;</a></span>MAX_HARDWARE_SPRITES</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_HARDWARE_SPRITES&#160;&#160;&#160;64</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Amount of hardware sprites in OAM </p>

</div>
</div>
<a id="afc296eacbda6a42f2a71aacab376ceb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc296eacbda6a42f2a71aacab376ceb7">&#9670;&nbsp;</a></span>HARDWARE_SPRITE_CAN_FLIP_X</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HARDWARE_SPRITE_CAN_FLIP_X&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>True if sprite hardware can flip sprites by X (horizontally) </p>

</div>
</div>
<a id="a9119d69d971f6bee9e55d0df8f0ac983"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9119d69d971f6bee9e55d0df8f0ac983">&#9670;&nbsp;</a></span>HARDWARE_SPRITE_CAN_FLIP_Y</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HARDWARE_SPRITE_CAN_FLIP_Y&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>True if sprite hardware can flip sprites by Y (vertically) </p>

</div>
</div>
<a id="a47865835d7d007d71b4bc8ae5cefb73a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47865835d7d007d71b4bc8ae5cefb73a">&#9670;&nbsp;</a></span>fill_rect</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define fill_rect&#160;&#160;&#160;<a class="el" href="nes_8h.html#a6879d813b6105ff8d9b36ec55c26a36e">fill_bkg_rect</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="aa1843c9b694489b612595631315c1c21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1843c9b694489b612595631315c1c21">&#9670;&nbsp;</a></span>palette_color_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a9508f919d9482d1d51534ccac212454d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9508f919d9482d1d51534ccac212454d">&#9670;&nbsp;</a></span>int_handler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* int_handler) (void) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Interrupt handlers </p>

</div>
</div>
<a id="a8e5ea12b86bdfc812448c2f5c4336c03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e5ea12b86bdfc812448c2f5c4336c03">&#9670;&nbsp;</a></span>OAM_item_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a> <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sprite Attributes structure </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Coordinate of the sprite on screen </td></tr>
    <tr><td class="paramname">y</td><td>Y Coordinate of the sprite on screen - 1 </td></tr>
    <tr><td class="paramname">tile</td><td>Sprite tile number (see <a class="el" href="sms_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a>) </td></tr>
    <tr><td class="paramname">prop</td><td>OAM Property Flags (see <a class="el" href="sms_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a>) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ab38fda7bad70c80c390aa7017c48b405"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab38fda7bad70c80c390aa7017c48b405">&#9670;&nbsp;</a></span>set_bkg_palette()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_palette </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_palette</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_palettes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *&#160;</td>
          <td class="paramname"><em>rgb_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a7c75cb6992e73971f24cee46aa31184b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c75cb6992e73971f24cee46aa31184b">&#9670;&nbsp;</a></span>set_sprite_palette()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_palette </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_palette</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_palettes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *&#160;</td>
          <td class="paramname"><em>rgb_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aaca025055febe9f4c605bfac12812d0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaca025055febe9f4c605bfac12812d0e">&#9670;&nbsp;</a></span>set_bkg_palette_entry()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_palette_entry </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>palette</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>entry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a>&#160;</td>
          <td class="paramname"><em>rgb_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad2adcd1b3390b43cdade1b73d95123a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2adcd1b3390b43cdade1b73d95123a0">&#9670;&nbsp;</a></span>set_sprite_palette_entry()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_palette_entry </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>palette</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>entry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a>&#160;</td>
          <td class="paramname"><em>rgb_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a5cc6bac1f2f0e9f71c7826a3ee8f35d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cc6bac1f2f0e9f71c7826a3ee8f35d0">&#9670;&nbsp;</a></span>remove_VBL()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_VBL </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The remove functions will remove any interrupt handler.</p>
<p>A handler of NULL will cause bad things to happen if the given interrupt is enabled.</p>
<p>Removes the VBL interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a></dd></dl>
<p>Removes the VBL interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a> </dd></dl>

</div>
</div>
<a id="aca7413d0441f3ce1f30cca15ce4678ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca7413d0441f3ce1f30cca15ce4678ab">&#9670;&nbsp;</a></span>remove_LCD()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_LCD </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes the LCD interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#ad572dce0c703ed78eadcf5cd6cce7dd2">add_LCD()</a>, <a class="el" href="nes_8h.html#a5cc6bac1f2f0e9f71c7826a3ee8f35d0">remove_VBL()</a> </dd></dl>

</div>
</div>
<a id="a95b3f2754671e9aff7eb86e181d8ab99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95b3f2754671e9aff7eb86e181d8ab99">&#9670;&nbsp;</a></span>remove_TIM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_TIM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes the TIM interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#ad0cfd2f31b0dc3f15ef7c1305e383676">add_TIM()</a>, <a class="el" href="nes_8h.html#a5cc6bac1f2f0e9f71c7826a3ee8f35d0">remove_VBL()</a> </dd></dl>

</div>
</div>
<a id="a44e3fc6c86253db08fa99fdc448b1df0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44e3fc6c86253db08fa99fdc448b1df0">&#9670;&nbsp;</a></span>add_VBL()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_VBL </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a Vertical Blanking interrupt handler.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">h</td><td>The handler to be called whenever a V-blank interrupt occurs.</td></tr>
  </table>
  </dd>
</dl>
<p>Only a single handler is currently supported for NES.</p>
<p><b>Do not</b> use the function definition attributes <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> and <a class="el" href="asm_2types_8h.html#ac950c0db046e2f86d15e7ae1f558b017">INTERRUPT</a> when declaring ISR functions added via <a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a> (or LCD, etc). Those attributes are only required when constructing a bare jump from the interrupt vector itself (such as with <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a>).</p>
<p>ISR handlers added using <a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a>/etc are instead called via the GBDK ISR dispatcher which makes the extra function attributes unecessary.</p>
<dl class="section note"><dt>Note</dt><dd>The default GBDK VBL is installed automatically.</dd>
<dd>
On the current NES implementation, this handler is actually faked, and called before vblank occurs, by <a class="el" href="gb_8h.html#af57b77452ef377da18e4fbf0288013d1">vsync()</a>. Writes to PPU registers should be done to the shadow_ versions, so they are updated by the default VBL handler only when vblank actually occurs.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a></dd></dl>
<p>Adds a V-blank interrupt handler. </p>

</div>
</div>
<a id="ad572dce0c703ed78eadcf5cd6cce7dd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad572dce0c703ed78eadcf5cd6cce7dd2">&#9670;&nbsp;</a></span>add_LCD()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_LCD </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a LCD interrupt handler.</p>
<p>Called when the scanline matches the _lcd_scanline variables.</p>
<p>Only a single handler is currently supported for NES.</p>
<p>The use-case is to indicate to the user when the video hardware is about to redraw a given LCD line. This can be useful for dynamically controlling the scrolling registers to perform special video effects.</p>
<p><b>Do not</b> use the function definition attributes <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> and <a class="el" href="asm_2types_8h.html#ac950c0db046e2f86d15e7ae1f558b017">INTERRUPT</a> when declaring ISR functions added via <a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a> (or LCD, etc). Those attributes are only required when constructing a bare jump from the interrupt vector itself (such as with <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a>).</p>
<p>ISR handlers added using <a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a>/etc are instead called via the GBDK ISR dispatcher which makes the extra function attributes unecessary.</p>
<dl class="section note"><dt>Note</dt><dd>On the current NES implementation, this handler is actually faked, and called by the default VBL handler after a manual delay loop. Only one such faked "interrupt" is possible per frame. This means the CPU cycles wasted in the delay loop increase with higher values of _lcd_scanline. In practice, it makes this functionality mostly suited for a top status bar.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL</a>, <a class="el" href="gb_8h.html#a4e4afc51edff293a392211cb8d836591">nowait_int_handler</a>, <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a></dd></dl>
<p>Adds a LCD interrupt handler. </p>

</div>
</div>
<a id="ad0cfd2f31b0dc3f15ef7c1305e383676"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0cfd2f31b0dc3f15ef7c1305e383676">&#9670;&nbsp;</a></span>add_TIM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_TIM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a timer interrupt handler.</p>
<p>Can not be used together with <a class="el" href="gb_8h.html#a617176cc314371eeddcd8903584d62f0">add_low_priority_TIM</a></p>
<p>This interrupt handler is invoked at the end of the NMI handler for gbdk-nes, after first processing the registers writes done by the VBL and and LCD handlers. It is therefore currently limited to 60Hz / 50Hz (depending on system).</p>
<dl class="section note"><dt>Note</dt><dd>Make sure to wrap TIM interrupt handlers with a nooverlay pragma. For more details see <a class="el" href="docs_supported_consoles.html#docs_nes_tim_overlay">docs_nes_tim_overlay</a></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a44e3fc6c86253db08fa99fdc448b1df0">add_VBL</a> </dd>
<dd>
<a class="el" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts()</a> with <a class="el" href="nes_8h.html#a604256210ec5b90b68185e1a18efab49">TIM_IFLAG</a>, <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a> </dd></dl>

</div>
</div>
<a id="ade75173639b6e7be241b8eb31fe825ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade75173639b6e7be241b8eb31fe825ef">&#9670;&nbsp;</a></span>mode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the current screen mode - one of M_* modes</p>
<p>Normally used by internal functions only.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#acc9798fc62b5d626c91c8b0f20b522ff">M_DRAWING</a>, <a class="el" href="nes_8h.html#af0e30d6af308ffe5a025fbe85da40f6f">M_TEXT_OUT</a>, <a class="el" href="nes_8h.html#a908826e7180f94a5988ceb8633313a2e">M_TEXT_INOUT</a>, <a class="el" href="nes_8h.html#a04382de20738146fe873ddfb0585052b">M_NO_SCROLL</a>, <a class="el" href="nes_8h.html#aca2855edd2d28f66be551a0f7ec23f07">M_NO_INTERP</a> </dd></dl>

</div>
</div>
<a id="abac3c04dc3c056618aca0a0052f2cb93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abac3c04dc3c056618aca0a0052f2cb93">&#9670;&nbsp;</a></span>get_mode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_mode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the current mode</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#acc9798fc62b5d626c91c8b0f20b522ff">M_DRAWING</a>, <a class="el" href="nes_8h.html#af0e30d6af308ffe5a025fbe85da40f6f">M_TEXT_OUT</a>, <a class="el" href="nes_8h.html#a908826e7180f94a5988ceb8633313a2e">M_TEXT_INOUT</a>, <a class="el" href="nes_8h.html#a04382de20738146fe873ddfb0585052b">M_NO_SCROLL</a>, <a class="el" href="nes_8h.html#aca2855edd2d28f66be551a0f7ec23f07">M_NO_INTERP</a> </dd></dl>

</div>
</div>
<a id="a4093fb5f45f807fe8d4a45121f3fffc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4093fb5f45f807fe8d4a45121f3fffc5">&#9670;&nbsp;</a></span>get_system()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_system </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the system gbdk is running on. </p>

</div>
</div>
<a id="a206e8e54468237daed636cad12a70055"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a206e8e54468237daed636cad12a70055">&#9670;&nbsp;</a></span>delay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void delay </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Delays the given number of milliseconds. Uses no timers or interrupts, and can be called with interrupts disabled </p>

</div>
</div>
<a id="a8feed006393f8c8c070b2d29d91ec8aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8feed006393f8c8c070b2d29d91ec8aa">&#9670;&nbsp;</a></span>joypad()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> joypad </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reads and returns the current state of the joypad. Return value is an OR of J_*</p>
<p>When testing for multiple different buttons, it's best to read the joypad state <em>once</em> into a variable and then test using that variable.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#ab769c6e20778298be8bc3321476ceb53">J_START</a>, <a class="el" href="msx_8h.html#ab416a9d96d1582490828f4bac78a8b5b">J_SELECT</a>, <a class="el" href="msx_8h.html#a31af766e3b598eb7a6b63f55a4988e7a">J_A</a>, <a class="el" href="msx_8h.html#ae47e59a309120f9420993f26816b5e6d">J_B</a>, <a class="el" href="msx_8h.html#a05ca817ab32f6da612c3ae26db5abf02">J_UP</a>, <a class="el" href="msx_8h.html#ae032c5c544196e37ec0432f6cfad7904">J_DOWN</a>, <a class="el" href="msx_8h.html#ac70894fecac30c1ca9917f07373cf81c">J_LEFT</a>, <a class="el" href="msx_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325">J_RIGHT</a></dd></dl>
<p>Reads and returns the current state of the joypad. Follows Nintendo's guidelines for reading the pad. Return value is an OR of J_*</p>
<p>When testing for multiple different buttons, it's best to read the joypad state <em>once</em> into a variable and then test using that variable.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#ab769c6e20778298be8bc3321476ceb53">J_START</a>, <a class="el" href="msx_8h.html#ab416a9d96d1582490828f4bac78a8b5b">J_SELECT</a>, <a class="el" href="msx_8h.html#a31af766e3b598eb7a6b63f55a4988e7a">J_A</a>, <a class="el" href="msx_8h.html#ae47e59a309120f9420993f26816b5e6d">J_B</a>, <a class="el" href="msx_8h.html#a05ca817ab32f6da612c3ae26db5abf02">J_UP</a>, <a class="el" href="msx_8h.html#ae032c5c544196e37ec0432f6cfad7904">J_DOWN</a>, <a class="el" href="msx_8h.html#ac70894fecac30c1ca9917f07373cf81c">J_LEFT</a>, <a class="el" href="msx_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325">J_RIGHT</a></dd></dl>
<p>Reads and returns the current state of the joypad. </p>

</div>
</div>
<a id="a0029224262fa919f42f3337c298bda10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0029224262fa919f42f3337c298bda10">&#9670;&nbsp;</a></span>waitpad()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> waitpad </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>mask</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Waits until at least one of the buttons given in mask are pressed.</p>
<p>Normally only used for checking one key, but it will support many, even J_LEFT at the same time as J_RIGHT. :)</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#a5d30da8cdcfa644b7f6dc331cce6de5b">joypad</a> </dd>
<dd>
<a class="el" href="msx_8h.html#ab769c6e20778298be8bc3321476ceb53">J_START</a>, <a class="el" href="msx_8h.html#ab416a9d96d1582490828f4bac78a8b5b">J_SELECT</a>, <a class="el" href="msx_8h.html#a31af766e3b598eb7a6b63f55a4988e7a">J_A</a>, <a class="el" href="msx_8h.html#ae47e59a309120f9420993f26816b5e6d">J_B</a>, <a class="el" href="msx_8h.html#a05ca817ab32f6da612c3ae26db5abf02">J_UP</a>, <a class="el" href="msx_8h.html#ae032c5c544196e37ec0432f6cfad7904">J_DOWN</a>, <a class="el" href="msx_8h.html#ac70894fecac30c1ca9917f07373cf81c">J_LEFT</a>, <a class="el" href="msx_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325">J_RIGHT</a></dd></dl>
<p>Waits until at least one of the buttons given in mask are pressed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mask</td><td>Bitmask indicating which buttons to wait for</td></tr>
  </table>
  </dd>
</dl>
<p>Normally only used for checking one key, but it will support many, even J_LEFT at the same time as J_RIGHT. :)</p>
<dl class="section note"><dt>Note</dt><dd>Checks in a loop that doesn't HALT at all, so the CPU will be maxed out until this call returns. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#a5d30da8cdcfa644b7f6dc331cce6de5b">joypad</a> </dd>
<dd>
<a class="el" href="msx_8h.html#ab769c6e20778298be8bc3321476ceb53">J_START</a>, <a class="el" href="msx_8h.html#ab416a9d96d1582490828f4bac78a8b5b">J_SELECT</a>, <a class="el" href="msx_8h.html#a31af766e3b598eb7a6b63f55a4988e7a">J_A</a>, <a class="el" href="msx_8h.html#ae47e59a309120f9420993f26816b5e6d">J_B</a>, <a class="el" href="msx_8h.html#a05ca817ab32f6da612c3ae26db5abf02">J_UP</a>, <a class="el" href="msx_8h.html#ae032c5c544196e37ec0432f6cfad7904">J_DOWN</a>, <a class="el" href="msx_8h.html#ac70894fecac30c1ca9917f07373cf81c">J_LEFT</a>, <a class="el" href="msx_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325">J_RIGHT</a></dd></dl>
<p>Waits until at least one of the buttons given in mask are pressed. </p>

</div>
</div>
<a id="ae192e07aabd7c8b822db52c9bc1e542d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae192e07aabd7c8b822db52c9bc1e542d">&#9670;&nbsp;</a></span>waitpadup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void waitpadup </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Waits for the directional pad and all buttons to be released.</p>
<p>Waits for the directional pad and all buttons to be released.</p>
<dl class="section note"><dt>Note</dt><dd>Checks in a loop that doesn't HALT at all, so the CPU will be maxed out until this call returns.</dd></dl>
<p>Waits for the directional pad and all buttons to be released.</p>
<p>Note: Checks in a loop that doesn't HALT at all, so the CPU will be maxed out until this call returns. </p>

</div>
</div>
<a id="a54e98484026ce279ea5d3d0d7a3fb87a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54e98484026ce279ea5d3d0d7a3fb87a">&#9670;&nbsp;</a></span>joypad_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> joypad_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>npads</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structjoypads__t.html">joypads_t</a> *&#160;</td>
          <td class="paramname"><em>joypads</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes <a class="el" href="structjoypads__t.html">joypads_t</a> structure for polling multiple joypads </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">npads</td><td>number of joypads requested (1, 2 or 4) </td></tr>
    <tr><td class="paramname">joypads</td><td>pointer to <a class="el" href="structjoypads__t.html">joypads_t</a> structure to be initialized</td></tr>
  </table>
  </dd>
</dl>
<p>Only required for <a class="el" href="sms_8h.html#a1d45c65829490c5ec98362f5e60edc20">joypad_ex</a>, not required for calls to regular <a class="el" href="gb_8h.html#a4344fefd260763e12703138066841b19">joypad()</a> </p><dl class="section return"><dt>Returns</dt><dd>number of joypads avaliable </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#af3ee931a6c78c8716cadfedd9f627b6e">joypad_ex()</a>, <a class="el" href="structjoypads__t.html">joypads_t</a> </dd></dl>

</div>
</div>
<a id="af3ee931a6c78c8716cadfedd9f627b6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3ee931a6c78c8716cadfedd9f627b6e">&#9670;&nbsp;</a></span>joypad_ex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void joypad_ex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structjoypads__t.html">joypads_t</a> *&#160;</td>
          <td class="paramname"><em>joypads</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Polls all avaliable joypads</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#abe90cc2b5bb10c0ed9e01e548ddf8862">joypad_init()</a>, <a class="el" href="structjoypads__t.html">joypads_t</a></dd></dl>
<p>Polls all avaliable joypads (for the GB and ones connected via SGB) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">joypads</td><td>pointer to <a class="el" href="structjoypads__t.html">joypads_t</a> structure to be filled with joypad statuses, must be previously initialized with <a class="el" href="msx_8h.html#abe90cc2b5bb10c0ed9e01e548ddf8862">joypad_init()</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#abe90cc2b5bb10c0ed9e01e548ddf8862">joypad_init()</a>, <a class="el" href="structjoypads__t.html">joypads_t</a></dd></dl>
<p>Polls all avaliable joypads </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">joypads</td><td>pointer to <a class="el" href="structjoypads__t.html">joypads_t</a> structure to be filled with joypad statuses, must be previously initialized with <a class="el" href="msx_8h.html#abe90cc2b5bb10c0ed9e01e548ddf8862">joypad_init()</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#abe90cc2b5bb10c0ed9e01e548ddf8862">joypad_init()</a>, <a class="el" href="structjoypads__t.html">joypads_t</a> </dd></dl>

</div>
</div>
<a id="a232883ed798bce00a03b09705c67deef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a232883ed798bce00a03b09705c67deef">&#9670;&nbsp;</a></span>enable_interrupts()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void enable_interrupts </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Enables unmasked interrupts</p>
<dl class="section note"><dt>Note</dt><dd>Use <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> {...} instead for creating a block of of code which should execute with interrupts temporarily turned off.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a2b17818c7916bc2ff75196ff0627b1e9">disable_interrupts</a>, <a class="el" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts</a>, <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> </dd></dl>

</div>
</div>
<a id="a2b17818c7916bc2ff75196ff0627b1e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b17818c7916bc2ff75196ff0627b1e9">&#9670;&nbsp;</a></span>disable_interrupts()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void disable_interrupts </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Disables interrupts</p>
<dl class="section note"><dt>Note</dt><dd>Use <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> {...} instead for creating a block of of code which should execute with interrupts temporarily turned off.</dd></dl>
<p>This function may be called as many times as you like; however the first call to <a class="el" href="sms_8h.html#aad3a9797fd6d216671b5bbaccd8a4916">enable_interrupts</a> will re-enable them.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a232883ed798bce00a03b09705c67deef">enable_interrupts</a>, <a class="el" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts</a>, <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> </dd></dl>

</div>
</div>
<a id="a188c65cfeab067cc2b6dcbc97bf24a82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a188c65cfeab067cc2b6dcbc97bf24a82">&#9670;&nbsp;</a></span>set_interrupts()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_interrupts </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>flags</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the interrupt mask to flags. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">flags</td><td>A logical OR of *_IFLAGS</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a2ca7720b9a5da9b2173e1f74dba85541">VBL_IFLAG</a>, <a class="el" href="gb_8h.html#a61a9e2910380de6abb34df14ef634eb4">LCD_IFLAG</a>, <a class="el" href="gb_8h.html#a604256210ec5b90b68185e1a18efab49">TIM_IFLAG</a></dd></dl>
<p>Clears any pending interrupts and sets the interrupt mask register IO to flags. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">flags</td><td>A logical OR of *_IFLAGS</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This disables and then re-enables interrupts so it must be used outside of a critical section.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aad3a9797fd6d216671b5bbaccd8a4916">enable_interrupts()</a>, <a class="el" href="gb_8h.html#ae3e53d15b4fc64f43761f55c1793b490">disable_interrupts()</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a2ca7720b9a5da9b2173e1f74dba85541">VBL_IFLAG</a>, <a class="el" href="gb_8h.html#a61a9e2910380de6abb34df14ef634eb4">LCD_IFLAG</a>, <a class="el" href="gb_8h.html#a604256210ec5b90b68185e1a18efab49">TIM_IFLAG</a>, <a class="el" href="gb_8h.html#ad90564458646c5646b3880b93db3443e">SIO_IFLAG</a>, <a class="el" href="gb_8h.html#a2f829cf27d6e3e24c875e9b82dfcb280">JOY_IFLAG</a> </dd></dl>

</div>
</div>
<a id="a3aea9deb2a0bfea9ff05a898f4822e31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3aea9deb2a0bfea9ff05a898f4822e31">&#9670;&nbsp;</a></span>reset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void reset </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Performs a soft reset.</p>
<p>For the Game Boy and related it does this by jumping to address 0x0150 which is in crt0.s (the c-runtime that executes before main() is called).</p>
<p>This performs various startup steps such as resetting the stack, clearing WRAM and OAM, resetting initialized variables and some display registers (scroll, window, LCDC), etc.</p>
<p>This is not the same a hard power reset. </p>

</div>
</div>
<a id="a73b4e18d7f5eaf5398bf0241c9c21586"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73b4e18d7f5eaf5398bf0241c9c21586">&#9670;&nbsp;</a></span>vsync()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vsync </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Waits for the vertical blank interrupt.</p>
<p>This is often used in main loops to idle the CPU until it's time to start the next frame. It's also useful for syncing animation with the screen re-draw.</p>
<p>Warning: If the VBL interrupt is disabled, this function will never return.</p>
<p>HALTs the CPU and waits for the vertical blank interrupt and then returns when all registered VBL ISRs have completed.</p>
<p>This is often used in main loops to idle the CPU at low power until it's time to start the next frame. It's also useful for syncing animation with the screen re-draw.</p>
<p>Warning: If the VBL interrupt is disabled, this function will never return. If the screen is off this function returns immediately.</p>
<p>HALTs the CPU and waits for the vertical blank interrupt.</p>
<p>This is often used in main loops to idle the CPU at low power until it's time to start the next frame. It's also useful for syncing animation with the screen re-draw.</p>
<p>Warning: If the VBL interrupt is disabled, this function will never return. If the screen is off this function returns immediately. </p>

</div>
</div>
<a id="a64538fb78ce148a1a7045245f084a710"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64538fb78ce148a1a7045245f084a710">&#9670;&nbsp;</a></span>wait_vbl_done()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wait_vbl_done </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Obsolete. This function has been replaced by <a class="el" href="nes_8h.html#a73b4e18d7f5eaf5398bf0241c9c21586">vsync()</a>, which has identical behavior. </p>

</div>
</div>
<a id="a42756a31babdcb4b7e692960a069b13b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42756a31babdcb4b7e692960a069b13b">&#9670;&nbsp;</a></span>display_on()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void display_on </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns the display on.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a> </dd></dl>

</div>
</div>
<a id="a98aab5a3d75429f9e7861a8100629782"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98aab5a3d75429f9e7861a8100629782">&#9670;&nbsp;</a></span>display_off()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void display_off </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Turns the display off immediately. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a></dd></dl>
<p>Turns the display off.</p>
<p>Waits until the VBL before turning the display off. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a></dd></dl>
<p>Turns the display off.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a> </dd></dl>

</div>
</div>
<a id="a70802f5e313285aa3ea04b0f73b2700f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70802f5e313285aa3ea04b0f73b2700f">&#9670;&nbsp;</a></span>refresh_OAM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void refresh_OAM </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies data from shadow OAM to OAM </p>

</div>
</div>
<a id="a49635449fc261be2481b72d0165f12ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49635449fc261be2481b72d0165f12ad">&#9670;&nbsp;</a></span>set_vram_byte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_vram_byte </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set byte in vram at given memory location</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>address to write to </td></tr>
    <tr><td class="paramname">v</td><td>value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa81b3eb2f6ec56d70ccd27c7deae4098"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa81b3eb2f6ec56d70ccd27c7deae4098">&#9670;&nbsp;</a></span>get_bkg_xy_addr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>* get_bkg_xy_addr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get address of X,Y tile of background map </p>

</div>
</div>
<a id="aa224c9bac27c7fd268e62bdf33338a84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa224c9bac27c7fd268e62bdf33338a84">&#9670;&nbsp;</a></span>set_2bpp_palette()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_2bpp_palette </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>palette</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets palette for 2bpp color translation for GG/SMS, does nothing on GB </p>

</div>
</div>
<a id="a050b8b27fe6af3efcc17cd804f808d7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a050b8b27fe6af3efcc17cd804f808d7a">&#9670;&nbsp;</a></span>set_1bpp_colors_ex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_1bpp_colors_ex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>fgcolor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>bgcolor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="adcb394299a1033616fc7d2faec8bd6ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcb394299a1033616fc7d2faec8bd6ad">&#9670;&nbsp;</a></span>set_1bpp_colors()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_1bpp_colors </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>fgcolor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>bgcolor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a4eb0e4c6c672efdeb49c3cdba2fa4d4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">&#9670;&nbsp;</a></span>set_bkg_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for the Background</p>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>. Each Tile is 16 bytes in size (8x8 pixels, 2 bits-per-pixel).</p>
<p>Note: Sprite Tiles 128-255 share the same memory region as Background Tiles 128-255.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#abe4846d4570b4880b0e54b9e503f4d30">set_tile_data</a></dd></dl>
<p>Sets VRAM Tile Pattern data for the Background / Window</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (2 bpp) source tile data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>. Each Tile is 16 bytes in size (8x8 pixels, 2 bits-per-pixel).</p>
<dl class="section note"><dt>Note</dt><dd>Sprite Tiles 128-255 share the same memory region as Background Tiles 128-255.</dd></dl>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a>, <a class="el" href="gb_8h.html#abe4846d4570b4880b0e54b9e503f4d30">set_tile_data</a> </dd></dl>

</div>
</div>
<a id="a92d990e45d1cc8e28d98a87b0b9d70ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92d990e45d1cc8e28d98a87b0b9d70ff">&#9670;&nbsp;</a></span>set_bkg_1bpp_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_1bpp_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for the Background using 1bpp source data</p>
<p>Similar to <a class="el" href="sms_8h.html#a8130306da1177f4fef89e699f8e2add4">set_bkg_data</a>, except source data is 1 bit-per-pixel which gets expanded into 2 bits-per-pixel.</p>
<p>For a given bit that represent a pixel: </p><ul>
<li>0 will be expanded into color 0 </li>
<li>1 will be expanded into color 1, 2 or 3 depending on color argument</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a>, <a class="el" href="gb_8h.html#a6d25f7c43b1cbbb48b95cda7ab2c3141">HIDE_BKG</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a></dd></dl>
<p>Sets VRAM Tile Pattern data for the Background / Window using 1bpp source data</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first Tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of Tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (1bpp) source Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<p>Similar to <a class="el" href="sms_8h.html#a8130306da1177f4fef89e699f8e2add4">set_bkg_data</a>, except source data is 1 bit-per-pixel which gets expanded into 2 bits-per-pixel.</p>
<p>For a given bit that represent a pixel: </p><ul>
<li>0 will be expanded into the Background color </li>
<li>1 will be expanded into the Foreground color</li>
</ul>
<p>See <a class="el" href="sms_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> for details about setting the Foreground and Background colors.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a>, <a class="el" href="gb_8h.html#a6d25f7c43b1cbbb48b95cda7ab2c3141">HIDE_BKG</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a> </dd>
<dd>
<a class="el" href="gb_8h.html#acd5ee7a94059e6edbe9223f291bc2b46">set_win_1bpp_data</a>, <a class="el" href="gb_8h.html#ab3e60c92c9f8fbed855f8712187ea3ea">set_sprite_1bpp_data</a> </dd></dl>

</div>
</div>
<a id="a6ab3fa75195d44d8d7e867d4a4cb1131"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ab3fa75195d44d8d7e867d4a4cb1131">&#9670;&nbsp;</a></span>set_bkg_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets a rectangular region of Background Tile Map.</p>
<p>Entries are copied from map at <b>tiles</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>Use <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap()</a> instead when: </p><ul>
<li>Source map is wider than 32 tiles. </li>
<li>Writing a width that does not match the source map width <b>and</b> more than one row high at a time.</li>
</ul>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a></dd></dl>
<p>Sets a rectangular region of Background Tile Map.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source tile map data</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from map at <b>tiles</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>Use <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap()</a> instead when: </p><ul>
<li>Source map is wider than 32 tiles. </li>
<li>Writing a width that does not match the source map width <b>and</b> more than one row high at a time.</li>
</ul>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<dl class="section note"><dt>Note</dt><dd>Patterns 128-255 overlap with patterns 128-255 of the sprite Tile Pattern table.</dd></dl>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines whether Tile Numbers or Tile Attributes get set. </p><ul>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a6b6b917fd4f396ba028bb18631165781">VBK_TILES</a> Tile Numbers are written </li>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a418a105f4c7d4bf1cbc556eab72c27ca">VBK_ATTRIBUTES</a> Tile Attributes are written</li>
</ul>
<p>GBC Tile Attributes are defined as: </p><ul>
<li>Bit 7 - Priority flag. When this is set, it puts the tile above the sprites with colour 0 being transparent. <br  />
 0: Below sprites <br  />
 1: Above sprites <br  />
 Note: <a class="el" href="sms_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> needs to be set for these priorities to take place. </li>
<li>Bit 6 - Vertical flip. Dictates which way up the tile is drawn vertically. <br  />
 0: Normal <br  />
 1: Flipped Vertically </li>
<li>Bit 5 - Horizontal flip. Dictates which way up the tile is drawn horizontally. <br  />
 0: Normal <br  />
 1: Flipped Horizontally </li>
<li>Bit 4 - Not used </li>
<li>Bit 3 - Character Bank specification. Dictates from which bank of Background Tile Patterns the tile is taken. <br  />
 0: Bank 0 <br  />
 1: Bank 1 </li>
<li>Bit 2 - See bit 0. </li>
<li>Bit 1 - See bit 0. </li>
<li>Bit 0 - Bits 0-2 indicate which of the 7 BKG colour palettes the tile is assigned.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a0254d6e23d4202cb070b1fe54c6a7210"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0254d6e23d4202cb070b1fe54c6a7210">&#9670;&nbsp;</a></span>set_bkg_attributes_nes16x16()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_attributes_nes16x16 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>attributes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets a rectangular region of Background Tile Map Attributes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 15 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 14 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 16 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 15 </td></tr>
    <tr><td class="paramname">attributes</td><td>Pointer to source tile map attribute data</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from map at <b>tiles</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>NES 16x16 Tile Attributes are tightly packed into 4 attributes per byte, with each 16x16 area of a 32x32 pixel block using the bits as follows: D1-D0: Top-left 16x16 pixels D3-D2: Top-right 16x16 pixels D5-D4: Bottom-left 16x16 pixels D7-D6: Bottom-right 16x16 pixels</p>
<p><a href="https://www.nesdev.org/wiki/PPU_attribute_tables">https://www.nesdev.org/wiki/PPU_attribute_tables</a></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a>, <a class="el" href="nes_8h.html#a34490cffc1e857ac41c880b6bca92c4f">set_bkg_submap_attributes</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="nes_8h.html#a399a0430a177e349cc691c5109427c01">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a8278909fae5ed243e03f8815ac95bab3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8278909fae5ed243e03f8815ac95bab3">&#9670;&nbsp;</a></span>set_bkg_attributes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_attributes </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>attributes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular region of Background Tile Map Attributes.</p>
<p>Entries are copied from map at <b>tiles</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>Use <a class="el" href="gb_8h.html#a1cefe143b3861632897e0c989401bce7">set_bkg_submap_attributes()</a> instead when: </p><ul>
<li>Source map is wider than 32 tiles. </li>
<li>Writing a width that does not match the source map width <b>and</b> more than one row high at a time.</li>
</ul>
<p>One byte per source tile map attribute entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<p>Please note that this is just a wrapper function for <a class="el" href="nes_8h.html#a0254d6e23d4202cb070b1fe54c6a7210">set_bkg_attributes_nes16x16()</a> and divides the coordinates and dimensions by 2 to achieve this. It is intended to make code more portable by using the same coordinate system that systems with the much more common 8x8 attribute resolution would use.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a>, <a class="el" href="nes_8h.html#a34490cffc1e857ac41c880b6bca92c4f">set_bkg_submap_attributes</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="nes_8h.html#a399a0430a177e349cc691c5109427c01">set_tiles</a> </dd></dl>

</div>
</div>
<a id="aadba8b700b97ec97dc9c488496619fd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadba8b700b97ec97dc9c488496619fd9">&#9670;&nbsp;</a></span>set_bkg_submap_attributes_nes16x16()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_submap_attributes_nes16x16 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Background Tile Map using a sub-region from a source tile map. Useful for scrolling implementations of maps larger than 32 x 30 tiles / 16x15 attributes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in both the Source Attribute Map and hardware Background Map attribute coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in both the Source Attribute Map and hardware Background Map attribute coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in Attributes. Range 1 - 127 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in Attributes. Range 1 - 127 </td></tr>
    <tr><td class="paramname">map</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">map_w</td><td>Width of source tile map in tiles. Range 1 - 127</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from <b>map</b> to the Background Attribute Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> attributes, using <b>map_w</b> as the rowstride for the source attribute map.</p>
<p>The <b>x</b> and <b>y</b> parameters are in Source Attribute Map Attribute coordinates. The location tiles will be written to on the hardware Background Map is derived from those, but only uses the lower 5 bits of each axis, for range of 0-15 (they are bit-masked: <code>x &amp; 0xF</code> and <code>y &amp; 0xF</code>). As a result the two coordinate systems are aligned together.</p>
<p>In order to transfer tile map data in a way where the coordinate systems are not aligned, an offset from the Source Attribute Map pointer can be passed in: <code>(map_ptr + x + (y * map_width))</code>.</p>
<p>For example, if you want the tile id at <code>1,2</code> from the source map to show up at <code>0,0</code> on the hardware Background Map (instead of at <code>1,2</code>) then modify the pointer address that is passed in: <code>map_ptr + 1 + (2 * map_width)</code></p>
<p>Use this instead of <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> when the source map is wider than 32 tiles or when writing a width that does not match the source map width.</p>
<p>One byte per source attribute map entry.</p>
<p>Writes that exceed coordinate 15/14 on the x / y axis will wrap around to the Left and Top edges.</p>
<p>See <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> for setting CGB attribute maps with <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a>, <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a>, <a class="el" href="sms_8h.html#abb50a392ca0d0419a080413287ee5d79">set_win_submap</a>, <a class="el" href="nes_8h.html#a399a0430a177e349cc691c5109427c01">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a34490cffc1e857ac41c880b6bca92c4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34490cffc1e857ac41c880b6bca92c4f">&#9670;&nbsp;</a></span>set_bkg_submap_attributes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_submap_attributes </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>attributes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Background Tile Map attributes using a sub-region from a source tile map. Useful for scrolling implementations of maps larger than 32 x 30 tiles.</p>
<p>Please note that this is just a wrapper function for <a class="el" href="nes_8h.html#aadba8b700b97ec97dc9c488496619fd9">set_bkg_submap_attributes_nes16x16()</a> and divides the coordinates and dimensions by 2 to achieve this. It is intended to make code more portable by using the same coordinate system that systems with the much more common 8x8 attribute resolution would use.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a>, <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a>, <a class="el" href="sms_8h.html#abb50a392ca0d0419a080413287ee5d79">set_win_submap</a>, <a class="el" href="nes_8h.html#a399a0430a177e349cc691c5109427c01">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a811c386cac0df2d260aacb5a43608be5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a811c386cac0df2d260aacb5a43608be5">&#9670;&nbsp;</a></span>set_bkg_based_tiles()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_based_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>base_tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular region of Background Tile Map. The offset value in <b>base_tile</b> is added to the tile ID for each map entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">base_tile</td><td>Offset each tile ID entry of the source map by this value. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>This is identical to <a class="el" href="msx_8h.html#a9a732aec1b7aec7d10a9d76ca4da2064">set_bkg_tiles()</a> except that it adds the <b>base_tile</b> parameter for when a tile map's tiles don't start at index zero. (For example, the tiles used by the map range from 100 -&gt; 120 in VRAM instead of 0 -&gt; 20).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> for more details </dd></dl>

</div>
</div>
<a id="ac2c9fd8d613ad8ba52227c5a056e56fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2c9fd8d613ad8ba52227c5a056e56fa">&#9670;&nbsp;</a></span>set_bkg_submap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_submap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Background Tile Map using a sub-region from a source tile map. Useful for scrolling implementations of maps larger than 32 x 32 tiles.</p>
<p>@ param x X Start position in Background Map tile coordinates. Range 0 - 31 @ param y Y Start position in Background Map tile coordinates. Range 0 - 31 @ param w Width of area to set in tiles. Range 1 - 255 @ param h Height of area to set in tiles. Range 1 - 255 @ param map Pointer to source tile map data @ param map_w Width of source tile map in tiles. Range 1 - 255</p>
<p>Entries are copied from <b>map</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles, using <b>map_w</b> as the rowstride for the source tile map.</p>
<p>Use this instead of <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> when the source map is wider than 32 tiles or when writing a width that does not match the source map width.</p>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<p>See <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> for setting CGB attribute maps with <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a>, <a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a></dd></dl>
<p>Sets a rectangular area of the Background Tile Map using a sub-region from a source tile map. Useful for scrolling implementations of maps larger than 32 x 32 tiles.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in both the Source Tile Map and hardware Background Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in both the Source Tile Map and hardware Background Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">map</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">map_w</td><td>Width of source tile map in tiles. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from <b>map</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles, using <b>map_w</b> as the rowstride for the source tile map.</p>
<p>The <b>x</b> and <b>y</b> parameters are in Source Tile Map tile coordinates. The location tiles will be written to on the hardware Background Map is derived from those, but only uses the lower 5 bits of each axis, for range of 0-31 (they are bit-masked: <code>x &amp; 0x1F</code> and <code>y &amp; 0x1F</code>). As a result the two coordinate systems are aligned together.</p>
<p>In order to transfer tile map data in a way where the coordinate systems are not aligned, an offset from the Source Tile Map pointer can be passed in: <code>(map_ptr + x + (y * map_width))</code>.</p>
<p>For example, if you want the tile id at <code>1,2</code> from the source map to show up at <code>0,0</code> on the hardware Background Map (instead of at <code>1,2</code>) then modify the pointer address that is passed in: <code>map_ptr + 1 + (2 * map_width)</code></p>
<p>Use this instead of <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> when the source map is wider than 32 tiles or when writing a width that does not match the source map width.</p>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<p>See <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> for setting CGB attribute maps with <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a>, <a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a> </dd></dl>

</div>
</div>
<a id="abc8bc5808620a9717263b8c9ec2237f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc8bc5808620a9717263b8c9ec2237f0">&#9670;&nbsp;</a></span>set_bkg_based_submap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_based_submap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>base_tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Background Tile Map using a sub-region from a source tile map. The offset value in <b>base_tile</b> is added to the tile ID for each map entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">map</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">map_w</td><td>Width of source tile map in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">base_tile</td><td>Offset each tile ID entry of the source map by this value. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>This is identical to <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap()</a> except that it adds the <b>base_tile</b> parameter for when a tile map's tiles don't start at index zero. (For example, the tiles used by the map range from 100 -&gt; 120 in VRAM instead of 0 -&gt; 20).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#ac2c9fd8d613ad8ba52227c5a056e56fa">set_bkg_submap</a> for more details </dd></dl>

</div>
</div>
<a id="ab8d3e0c6cb1c5687806defef521f8fd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8d3e0c6cb1c5687806defef521f8fd2">&#9670;&nbsp;</a></span>get_bkg_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_bkg_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies a rectangular region of Background Tile Map entries into a buffer.</p>
<p>Entries are copied into <b>tiles</b> from the Background Tile Map starting at <b>x</b>, <b>y</b> reading across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>One byte per tile.</p>
<p>The buffer pointed to by <b>tiles</b> should be at least <b>x</b> x <b>y</b> bytes in size.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a55c6581dbe9300dc6df41730f090af51">get_bkg_tile_xy</a>, <a class="el" href="gb_8h.html#af9830fb188433cb0305c2cefb8f8ab11">get_tiles</a></dd></dl>
<p>Copies a rectangular region of Background Tile Map entries into a buffer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to copy in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to copy in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to destination buffer for Tile Map data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details.</dd></dl>
<p>Entries are copied into <b>tiles</b> from the Background Tile Map starting at <b>x</b>, <b>y</b> reading across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>One byte per tile.</p>
<p>The buffer pointed to by <b>tiles</b> should be at least <b>x</b> x <b>y</b> bytes in size.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8a469de4c6640f921254b336b5a6191a">get_win_tiles</a>, <a class="el" href="gb_8h.html#a55c6581dbe9300dc6df41730f090af51">get_bkg_tile_xy</a>, <a class="el" href="gb_8h.html#af9830fb188433cb0305c2cefb8f8ab11">get_tiles</a>, <a class="el" href="gb_8h.html#ae32250cfb4daaa1fff7250a0e3f0ad0f">get_vram_byte</a> </dd></dl>

</div>
</div>
<a id="a31655c4b138654e803e295bd4413759c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31655c4b138654e803e295bd4413759c">&#9670;&nbsp;</a></span>set_bkg_tile_xy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>* set_bkg_tile_xy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set single tile t on background layer at x,y </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
    <tr><td class="paramname">t</td><td>tile index </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns the address of tile, so you may use faster <a class="el" href="nes_8h.html#a49635449fc261be2481b72d0165f12ad">set_vram_byte()</a> later </dd></dl>

</div>
</div>
<a id="a7b7c27e672467f08097f744f3530bbc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b7c27e672467f08097f744f3530bbc7">&#9670;&nbsp;</a></span>set_bkg_attribute_xy_nes16x16()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_attribute_xy_nes16x16 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set single attribute data a on background layer at x,y</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
    <tr><td class="paramname">a</td><td>tile attributes </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a7cd23c81062d37753a4429b794907524"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cd23c81062d37753a4429b794907524">&#9670;&nbsp;</a></span>set_bkg_attribute_xy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_attribute_xy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set single attribute data a on background layer at x,y</p>
<p>Please note that this is just a wrapper function for <a class="el" href="nes_8h.html#aadba8b700b97ec97dc9c488496619fd9">set_bkg_submap_attributes_nes16x16()</a> and divides the coordinates and dimensions by 2 to achieve this. It is intended to make code more portable by using the same coordinate system that systems with the much more common 8x8 attribute resolution would use.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
    <tr><td class="paramname">a</td><td>tile attributes </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="adaca04ce3d7213e6d0348196cd592780"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adaca04ce3d7213e6d0348196cd592780">&#9670;&nbsp;</a></span>get_bkg_tile_xy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_bkg_tile_xy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get single tile t on background layer at x,y </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns tile index</dd></dl>
<p>Get single tile t on background layer at x,y </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns tile index</dd></dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details. </dd></dl>

</div>
</div>
<a id="a6261537edc74068e3f7f057e6a3e8a57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6261537edc74068e3f7f057e6a3e8a57">&#9670;&nbsp;</a></span>move_bkg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void move_bkg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves the Background Layer to the position specified in <b>x</b> and <b>y</b> in pixels.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X axis screen coordinate for Left edge of the Background </td></tr>
    <tr><td class="paramname">y</td><td>Y axis screen coordinate for Top edge of the Background</td></tr>
  </table>
  </dd>
</dl>
<p>0,0 is the top left corner of the GB screen. The Background Layer wraps around the screen, so when part of it goes off the screen it appears on the opposite side (factoring in the larger size of the Background Layer versus the screen size).</p>
<p>The background layer is always under the Window Layer.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a>, <a class="el" href="nes_8h.html#a6d25f7c43b1cbbb48b95cda7ab2c3141">HIDE_BKG</a> </dd></dl>

</div>
</div>
<a id="a1f583f7a880daa6145ca78b086a209d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f583f7a880daa6145ca78b086a209d1">&#9670;&nbsp;</a></span>scroll_bkg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void scroll_bkg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves the Background relative to it's current position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Number of pixels to move the Background on the <b>X axis</b> <br  />
 Range: -128 - 127 </td></tr>
    <tr><td class="paramname">y</td><td>Number of pixels to move the Background on the <b>Y axis</b> <br  />
 Range: -128 - 127</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a6261537edc74068e3f7f057e6a3e8a57">move_bkg</a> </dd></dl>

</div>
</div>
<a id="adc0ef4fa6435ca3a1aac93f533eb85da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc0ef4fa6435ca3a1aac93f533eb85da">&#9670;&nbsp;</a></span>set_sprite_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for Sprites</p>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>. Each Tile is 16 bytes in size (8x8 pixels, 2 bits-per-pixel).</p>
<p>Note: Sprite Tiles 128-255 share the same memory region as Background Tiles 128-255.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG=0 indicates the first bank </li>
<li>VBK_REG=1 indicates the second</li>
</ul>
<p>Sets VRAM Tile Pattern data for Sprites</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (2 bpp) source Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>. Each Tile is 16 bytes in size (8x8 pixels, 2 bits-per-pixel).</p>
<dl class="section note"><dt>Note</dt><dd>Sprite Tiles 128-255 share the same memory region as Background Tiles 128-255.</dd></dl>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second </li>
</ul>

</div>
</div>
<a id="a6372e69db6290fbc0e73244dbe15f903"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6372e69db6290fbc0e73244dbe15f903">&#9670;&nbsp;</a></span>set_sprite_1bpp_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_1bpp_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for Sprites using 1bpp source data</p>
<p>Similar to <a class="el" href="sms_8h.html#a216a3e3d320ee4d8cf4845600487ae39">set_sprite_data</a>, except source data is 1 bit-per-pixel which gets expanded into 2 bits-per-pixel.</p>
<p>For a given bit that represent a pixel: </p><ul>
<li>0 will be expanded into color 0 </li>
<li>1 will be expanded into color 3</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a495bc9f405f916f02ad5d97e6e730134">SHOW_SPRITES</a>, <a class="el" href="gb_8h.html#a69ef98aee664b8abd8d1a3d45f016dda">HIDE_SPRITES</a>, <a class="el" href="gb_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a></dd></dl>
<p>Sets VRAM Tile Pattern data for Sprites using 1bpp source data</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (1bpp) source Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<p>Similar to <a class="el" href="sms_8h.html#a216a3e3d320ee4d8cf4845600487ae39">set_sprite_data</a>, except source data is 1 bit-per-pixel which gets expanded into 2 bits-per-pixel.</p>
<p>For a given bit that represent a pixel: </p><ul>
<li>0 will be expanded into the Background color </li>
<li>1 will be expanded into the Foreground color</li>
</ul>
<p>See <a class="el" href="sms_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> for details about setting the Foreground and Background colors.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a495bc9f405f916f02ad5d97e6e730134">SHOW_SPRITES</a>, <a class="el" href="gb_8h.html#a69ef98aee664b8abd8d1a3d45f016dda">HIDE_SPRITES</a>, <a class="el" href="gb_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a711fa26feecc76dc51482b0f77062859">set_bkg_1bpp_data</a>, <a class="el" href="gb_8h.html#acd5ee7a94059e6edbe9223f291bc2b46">set_win_1bpp_data</a> </dd></dl>

</div>
</div>
<a id="a7e0cdfd6b9a2ae1b7f30384f132d8687"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e0cdfd6b9a2ae1b7f30384f132d8687">&#9670;&nbsp;</a></span>SET_SHADOW_OAM_ADDRESS()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SET_SHADOW_OAM_ADDRESS </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>address</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Enable OAM DMA copy each VBlank and set it to transfer any 256-byte aligned array </p>

</div>
</div>
<a id="a2d30754c442641bdd882ab595dd77468"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d30754c442641bdd882ab595dd77468">&#9670;&nbsp;</a></span>set_sprite_tile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_tile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets sprite number <b>nb__in the OAM to display tile number __tile</b>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 63 </td></tr>
    <tr><td class="paramname">tile</td><td>Selects a tile (0 - 255) from PPU memory at 0000h - 0FFFh / 1000h - 1FFFh</td></tr>
  </table>
  </dd>
</dl>
<p>In 8x16 mode: </p><ul>
<li>The sprite will also display the next tile (<b>tile</b> + 1) directly below (y + 8) the first tile. </li>
<li>The lower bit of the tile number is ignored: the upper 8x8 tile is (<b>tile</b> &amp; 0xFE), and the lower 8x8 tile is (<b>tile</b> | 0x01). </li>
<li>See: <a class="el" href="sms_8h.html#af91d252f07f4764996154820f970c101">SPRITES_8x16</a></li>
</ul>
<p>Sets sprite number <b>nb__in the OAM to display tile number __tile</b>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">tile</td><td>Selects a tile (0 - 255) from memory at 8000h - 8FFFh <br  />
 In CGB Mode this could be either in VRAM Bank <br  />
 0 or 1, depending on Bit 3 of the OAM Attribute Flag <br  />
 (see <a class="el" href="sms_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a>)</td></tr>
  </table>
  </dd>
</dl>
<p>In 8x16 mode: </p><ul>
<li>The sprite will also display the next tile (<b>tile</b> + 1) directly below (y + 8) the first tile. </li>
<li>The lower bit of the tile number is ignored: the upper 8x8 tile is (<b>tile</b> &amp; 0xFE), and the lower 8x8 tile is (<b>tile</b> | 0x01). </li>
<li>See: <a class="el" href="sms_8h.html#af91d252f07f4764996154820f970c101">SPRITES_8x16</a> </li>
</ul>

</div>
</div>
<a id="a58eab770442930dad603ffba2b5d28f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58eab770442930dad603ffba2b5d28f3">&#9670;&nbsp;</a></span>get_sprite_tile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_sprite_tile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the tile number of sprite number <b>nb</b> in the OAM.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 63</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a> for more details</dd></dl>
<p>Returns the tile number of sprite number <b>nb</b> in the OAM.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a> for more details </dd></dl>

</div>
</div>
<a id="a96b6dd8b1dcb44f540baa6093b54154b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96b6dd8b1dcb44f540baa6093b54154b">&#9670;&nbsp;</a></span>set_sprite_prop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_prop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>prop</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets the OAM Property Flags of sprite number <b>nb</b> to those defined in <b>prop</b>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">prop</td><td>Property setting (see bitfield description)</td></tr>
  </table>
  </dd>
</dl>
<p>The bits in <b>prop</b> represent: </p><ul>
<li>Bit 7 - Vertical flip. Dictates which way up the sprite is drawn vertically. <br  />
 0: normal <br  />
 1: upside down </li>
<li>Bit 6 - Horizontal flip. Dictates which way up the sprite is drawn horizontally. <br  />
 0: normal <br  />
 1: back to front </li>
<li>Bit 5 - Priority flag. When this is set, the sprites appear behind the background and window layer. <br  />
 0: infront <br  />
 1: behind </li>
<li>Bit 4 - Unimplemented </li>
<li>Bit 3 - Unimplemented </li>
<li>Bit 2 - Unimplemented </li>
<li>Bit 1 - See bit 0. </li>
<li>Bit 0 - Bits 0-1 indicate which color palette the sprite should use. Note: only palettes 4 to 7 will be available for NES sprites.</li>
</ul>
<p>It's recommended to use GBDK constants (eg: S_FLIPY) to configure sprite properties as these are crossplatform.</p>
<div class="fragment"><div class="line"><span class="comment">// Load palette data into the first palette</span></div>
<div class="line"><a class="code" href="msx_8h.html#a7d5ed1aed79d8fd2894893d7f6f9b835">set_sprite_palette</a>(4, 1, exampleSprite_palettes)</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set the OAM value for the sprite</span></div>
<div class="line"><span class="comment">// These flags tell the sprite to use the first sprite palette (palette 4) and to flip the sprite both vertically and horizontally.</span></div>
<div class="line"><a class="code" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a>(0, <a class="code" href="gb_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a> | <a class="code" href="gb_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a>);</div>
<div class="ttc" id="agb_8h_html_a4bbb9cd6c38b2317de5256d1d889c63b"><div class="ttname"><a href="gb_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a></div><div class="ttdeci">#define S_FLIPY</div><div class="ttdef"><b>Definition:</b> gb.h:96</div></div>
<div class="ttc" id="agb_8h_html_a99ea3252469e3614e977cce2aa1d06f7"><div class="ttname"><a href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a></div><div class="ttdeci">void set_sprite_prop(uint8_t nb, uint8_t prop)</div><div class="ttdef"><b>Definition:</b> gb.h:1945</div></div>
<div class="ttc" id="agb_8h_html_ae97793b4039609f93b0f7f8bddb18011"><div class="ttname"><a href="gb_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a></div><div class="ttdeci">#define S_FLIPX</div><div class="ttdef"><b>Definition:</b> gb.h:92</div></div>
<div class="ttc" id="amsx_8h_html_a7d5ed1aed79d8fd2894893d7f6f9b835"><div class="ttname"><a href="msx_8h.html#a7d5ed1aed79d8fd2894893d7f6f9b835">set_sprite_palette</a></div><div class="ttdeci">#define set_sprite_palette(first_palette, nb_palettes, rgb_data)</div><div class="ttdef"><b>Definition:</b> msx.h:558</div></div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="sms_8h.html#a54572cf6791463b6d60623837e0bb5a6">S_PALETTE</a>, <a class="el" href="sms_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a>, <a class="el" href="sms_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a>, <a class="el" href="sms_8h.html#a9506d04c2ec7d2442a52054f67d2b32f">S_PRIORITY</a></dd></dl>
<p>Sets the OAM Property Flags of sprite number <b>nb</b> to those defined in <b>prop</b>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">prop</td><td>Property setting (see bitfield description)</td></tr>
  </table>
  </dd>
</dl>
<p>The bits in <b>prop</b> represent: </p><ul>
<li>Bit 7 - Priority flag. When this is set the sprites appear behind the background and window layer. <br  />
 0: infront <br  />
 1: behind </li>
<li>Bit 6 - Vertical flip. Dictates which way up the sprite is drawn vertically. <br  />
 0: normal <br  />
 1:upside down </li>
<li>Bit 5 - Horizontal flip. Dictates which way up the sprite is drawn horizontally. <br  />
 0: normal <br  />
 1:back to front </li>
<li>Bit 4 - DMG/Non-CGB Mode Only. Assigns either one of the two b/w palettes to the sprite. <br  />
 0: OBJ palette 0 <br  />
 1: OBJ palette 1 </li>
<li>Bit 3 - GBC only. Dictates from which bank of Sprite Tile Patterns the tile is taken. <br  />
 0: Bank 0 <br  />
 1: Bank 1 </li>
<li>Bit 2 - See bit 0. </li>
<li>Bit 1 - See bit 0. </li>
<li>Bit 0 - GBC only. Bits 0-2 indicate which of the 7 OBJ colour palettes the sprite is assigned.</li>
</ul>
<p>It's recommended to use GBDK constants (eg: S_FLIPY) to configure sprite properties as these are crossplatform.</p>
<div class="fragment"><div class="line"><span class="comment">// Load palette data into the first palette</span></div>
<div class="line"><a class="code" href="msx_8h.html#a7d5ed1aed79d8fd2894893d7f6f9b835">set_sprite_palette</a>(4, 1, exampleSprite_palettes)</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set the OAM value for the sprite</span></div>
<div class="line"><span class="comment">// These flags tell the sprite to flip both vertically and horizontally.</span></div>
<div class="line"><a class="code" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a>(0, <a class="code" href="gb_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a> | <a class="code" href="gb_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a>);</div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="sms_8h.html#a54572cf6791463b6d60623837e0bb5a6">S_PALETTE</a>, <a class="el" href="sms_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a>, <a class="el" href="sms_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a>, <a class="el" href="sms_8h.html#a9506d04c2ec7d2442a52054f67d2b32f">S_PRIORITY</a></dd></dl>
<p>Function has no affect on sms.</p>
<p>This function is only here to enable game portability </p>

</div>
</div>
<a id="a7f2058d3fe9c08127fd6f596a5df41c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f2058d3fe9c08127fd6f596a5df41c9">&#9670;&nbsp;</a></span>get_sprite_prop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_sprite_prop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the OAM Property Flags of sprite number <b>nb</b>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a96b6dd8b1dcb44f540baa6093b54154b">set_sprite_prop</a> for property bitfield settings </dd></dl>

</div>
</div>
<a id="a3e80bb115f7212eb72a5f341fdc408d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e80bb115f7212eb72a5f341fdc408d7">&#9670;&nbsp;</a></span>move_sprite()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void move_sprite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves sprite number <b>nb</b> to the <b>x</b>, <b>y</b> position on the screen.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 63 </td></tr>
    <tr><td class="paramname">x</td><td>X Position. Specifies the sprites horizontal position on the screen (minus 8). </td></tr>
    <tr><td class="paramname">y</td><td>Y Position. Specifies the sprites vertical position on the screen (minus 16). <br  />
 An offscreen value (Y&gt;=240) hides the sprite.</td></tr>
  </table>
  </dd>
</dl>
<p>Moving the sprite to 0,0 (or similar off-screen location) will hide it.</p>
<p>Moves sprite number <b>nb</b> to the <b>x</b>, <b>y</b> position on the screen.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">x</td><td>X Position. Specifies the sprites horizontal position on the screen (minus 8). <br  />
 An offscreen value (X=0 or X&gt;=168) hides the sprite, but the sprite still affects the priority ordering - a better way to hide a sprite is to set its Y-coordinate offscreen. </td></tr>
    <tr><td class="paramname">y</td><td>Y Position. Specifies the sprites vertical position on the screen (minus 16). <br  />
 An offscreen value (for example, Y=0 or Y&gt;=160) hides the sprite.</td></tr>
  </table>
  </dd>
</dl>
<p>Moving the sprite to 0,0 (or similar off-screen location) will hide it. </p>

</div>
</div>
<a id="a552685b6419acf2fa4925a4ab5687be9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a552685b6419acf2fa4925a4ab5687be9">&#9670;&nbsp;</a></span>scroll_sprite()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void scroll_sprite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves sprite number <b>nb</b> relative to its current position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 63 </td></tr>
    <tr><td class="paramname">x</td><td>Number of pixels to move the sprite on the <b>X axis</b> <br  />
 Range: -128 - 127 </td></tr>
    <tr><td class="paramname">y</td><td>Number of pixels to move the sprite on the <b>Y axis</b> <br  />
 Range: -128 - 127</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab42c12c1d9aed3fd963248fbea9830cd">move_sprite</a> for more details about the X and Y position</dd></dl>
<p>Moves sprite number <b>nb</b> relative to its current position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">x</td><td>Number of pixels to move the sprite on the <b>X axis</b> <br  />
 Range: -128 - 127 </td></tr>
    <tr><td class="paramname">y</td><td>Number of pixels to move the sprite on the <b>Y axis</b> <br  />
 Range: -128 - 127</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab42c12c1d9aed3fd963248fbea9830cd">move_sprite</a> for more details about the X and Y position </dd></dl>

</div>
</div>
<a id="a92649b68e5fea88d171d933f9a605e50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92649b68e5fea88d171d933f9a605e50">&#9670;&nbsp;</a></span>hide_sprite()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void hide_sprite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Hides sprite number <b>nb</b> by moving it to Y position 240.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 63</td></tr>
  </table>
  </dd>
</dl>
<p>Hides sprite number <b>nb</b> by moving it to zero position by Y.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="sms_2metasprites_8h.html#a51db5a47025de1c8765885281999d53c">hide_sprites_range</a>, <a class="el" href="msx_8h.html#a69ef98aee664b8abd8d1a3d45f016dda">HIDE_SPRITES</a></dd></dl>
<p>Hides sprite number <b>nb</b> by moving it to zero position by Y.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae1a305a579576715ad2d8f70327265da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1a305a579576715ad2d8f70327265da">&#9670;&nbsp;</a></span>set_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>vram_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies arbitrary data to an address in VRAM without taking into account the state of LCDC bits 3 or 4.</p>
<p>Copies <b>len</b> bytes from a buffer at <b>data</b> to VRAM starting at <b>vram_addr</b>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a>, <a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a>, <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="nes_8h.html#a2539f237ce7da8ff6eb0bad4c8c48a4c">set_tile_data</a>, <a class="el" href="nes_8h.html#a399a0430a177e349cc691c5109427c01">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a399a0430a177e349cc691c5109427c01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a399a0430a177e349cc691c5109427c01">&#9670;&nbsp;</a></span>set_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>vram_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets a rectangular region of Tile Map entries at a given VRAM Address.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">vram_addr</td><td>Pointer to destination VRAM Address </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source Tile Map data</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from <b>tiles</b> to Tile Map at address vram_addr starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>One byte per source tile map entry.</p>
<p>There are two 32x30 Tile Maps in VRAM at addresses 2000h-23FFh and 2400h-27FFh.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> </dd></dl>

</div>
</div>
<a id="a2539f237ce7da8ff6eb0bad4c8c48a4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2539f237ce7da8ff6eb0bad4c8c48a4c">&#9670;&nbsp;</a></span>set_tile_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_tile_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data starting from given base address without taking into account the state of PPUMASK.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a>, <a class="el" href="nes_8h.html#ae1a305a579576715ad2d8f70327265da">set_data</a> </dd></dl>

</div>
</div>
<a id="a65860edee9a1a70fe56434dca397819e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65860edee9a1a70fe56434dca397819e">&#9670;&nbsp;</a></span>set_bkg_native_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_native_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for the Background in the native format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source tile data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#abe4846d4570b4880b0e54b9e503f4d30">set_tile_data</a></dd></dl>
<p>Sets VRAM Tile Pattern data for the Background / Window in the native format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source tile data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a>, <a class="el" href="gb_8h.html#abe4846d4570b4880b0e54b9e503f4d30">set_tile_data</a> </dd></dl>

</div>
</div>
<a id="a6c4aa6393c42e2d4079b2f922b9b9c84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c4aa6393c42e2d4079b2f922b9b9c84">&#9670;&nbsp;</a></span>set_sprite_native_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_native_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for Sprites in the native format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source tile data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>.</p>
<p>Sets VRAM Tile Pattern data for Sprites in the native format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source tile data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second </li>
</ul>

</div>
</div>
<a id="a68651e50243349b48164a8ad983dca4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68651e50243349b48164a8ad983dca4e">&#9670;&nbsp;</a></span>set_native_tile_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_native_tile_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data in the native format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write (0 - 511) </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source Tile Pattern data.</td></tr>
  </table>
  </dd>
</dl>
<p>When <code>first_tile</code> is larger than 256 on the GB/AP, it will write to sprite data instead of background data.</p>
<p>The bit depth of the source Tile Pattern data depends on which console is being used: </p><ul>
<li>NES: loads 2bpp tiles data </li>
</ul>

</div>
</div>
<a id="ad4e94bfe39cbe8e1b366d65c13adb464"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4e94bfe39cbe8e1b366d65c13adb464">&#9670;&nbsp;</a></span>init_bkg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void init_bkg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes the entire Background Tile Map with Tile Number <b>c</b> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>Tile number to fill with</td></tr>
  </table>
  </dd>
</dl>
<p>Note: This function avoids writes during modes 2 &amp; 3</p>
<p>Initializes the entire Background Tile Map with Tile Number <b>c</b> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>Tile number to fill with</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function avoids writes during modes 2 &amp; 3 </dd></dl>

</div>
</div>
<a id="a2b8cf9f9482d5292459ad81d2ef78840"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b8cf9f9482d5292459ad81d2ef78840">&#9670;&nbsp;</a></span>vmemset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmemset </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fills the VRAM memory region <b>s</b> of size <b>n</b> with Tile Number <b>c</b> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>Start address in VRAM </td></tr>
    <tr><td class="paramname">c</td><td>Tile number to fill with </td></tr>
    <tr><td class="paramname">n</td><td>Size of memory region (in bytes) to fill</td></tr>
  </table>
  </dd>
</dl>
<p>Note: This function avoids writes during modes 2 &amp; 3</p>
<p>Fills the VRAM memory region <b>s</b> of size <b>n</b> with Tile Number <b>c</b> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>Start address in VRAM </td></tr>
    <tr><td class="paramname">c</td><td>Tile number to fill with </td></tr>
    <tr><td class="paramname">n</td><td>Size of memory region (in bytes) to fill</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function avoids writes during modes 2 &amp; 3 </dd></dl>

</div>
</div>
<a id="a6879d813b6105ff8d9b36ec55c26a36e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6879d813b6105ff8d9b36ec55c26a36e">&#9670;&nbsp;</a></span>fill_bkg_rect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill_bkg_rect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fills a rectangular region of Tile Map entries for the Background layer with tile.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">tile</td><td>Fill value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a01ad58154ff5a51a439ffdd1bafe92c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01ad58154ff5a51a439ffdd1bafe92c5">&#9670;&nbsp;</a></span>flush_shadow_attributes()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void flush_shadow_attributes </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>"Flushes" the updates to the shadow attributes so they are written to the transfer buffer, and then written to PPU memory on next vblank.</p>
<p>This function must be called to see visible changes to attributes on the NES target. But it will automatically be called by <a class="el" href="gb_8h.html#af57b77452ef377da18e4fbf0288013d1">vsync()</a>, so the use-cases for calling it manually are rare in practice. </p>

</div>
</div>
<a id="a7d6c7ed0155e52b62936a04f6d98715d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d6c7ed0155e52b62936a04f6d98715d">&#9670;&nbsp;</a></span>_switch_prg0()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _switch_prg0 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>bank</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a78fd7730ed37db84f52bcfc9ff41873f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78fd7730ed37db84f52bcfc9ff41873f">&#9670;&nbsp;</a></span>_SYSTEM</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _SYSTEM</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a78d2fd18666afec116f176d46debb4e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78d2fd18666afec116f176d46debb4e7">&#9670;&nbsp;</a></span>sys_time</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> sys_time</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Global Time Counter in VBL periods (60Hz)</p>
<p>Increments once per Frame</p>
<p>Will wrap around every ~18 minutes (unsigned 16 bits = 65535 / 60 / 60 = 18.2) </p>

</div>
</div>
<a id="a06bab3f8bce032de0d21fbd86e14c3f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06bab3f8bce032de0d21fbd86e14c3f3">&#9670;&nbsp;</a></span>_current_bank</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _current_bank</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Tracks current active ROM bank</p>
<p>The active bank number is not tracked by <a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a> when <a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M</a> is used.</p>
<p>This variable is updated automatically when you call SWITCH_ROM_MBC1 or SWITCH_ROM_MBC5, <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a>, or call a BANKED function.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a19558f5bbc9fea767f945001ae9cd13f">SWITCH_ROM_MBC1()</a>, <a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5()</a>, <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a></dd></dl>
<p>Tracks current active ROM bank</p>
<p>In most cases the <a class="el" href="sms_8h.html#ae042588f20bf5a2349c8ad8716245233">CURRENT_BANK</a> macro for this variable is recommended for use instead of the variable itself.</p>
<p>The active bank number is not tracked by <a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a> when <a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M</a> is used.</p>
<p>This variable is updated automatically when you call SWITCH_ROM_MBC1 or SWITCH_ROM_MBC5, <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a>, or call a BANKED function.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a19558f5bbc9fea767f945001ae9cd13f">SWITCH_ROM_MBC1()</a>, <a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5()</a>, <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a> </dd></dl>

</div>
</div>
<a id="a250f5339e05523912926be566e9eb8c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a250f5339e05523912926be566e9eb8c0">&#9670;&nbsp;</a></span>_current_1bpp_colors</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> _current_1bpp_colors</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aa82205e9629f984d0b3dc8055c211522"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa82205e9629f984d0b3dc8055c211522">&#9670;&nbsp;</a></span>_map_tile_offset</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _map_tile_offset</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ab472d9bbb1bcfd141374f5babc71934c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab472d9bbb1bcfd141374f5babc71934c">&#9670;&nbsp;</a></span>_submap_tile_offset</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _submap_tile_offset</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a3619f9cb1e3c92238a033ead79a0c551"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3619f9cb1e3c92238a033ead79a0c551">&#9670;&nbsp;</a></span>shadow_OAM</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile struct <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a> shadow_OAM[]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Shadow OAM array in WRAM, that is DMA-transferred into the real OAM each VBlank </p>

</div>
</div>
<a id="a6286d69d5fb1133edd0c01c9545c62e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6286d69d5fb1133edd0c01c9545c62e4">&#9670;&nbsp;</a></span>_shadow_OAM_base</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _shadow_OAM_base</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>MSB of shadow_OAM address is used by OAM DMA copying routine </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
</div>
</body>
</html>
